#1
|
|||
|
|||
Auto Format in EvenScripter Editor is Annoying!
I have a few scripts that are longer than 1000 lines and auto format takes anywhere between 4-7seconds to finish up the auto format the script each time editor is open up.
During first 4-7seconds I already started making changing in the code and 'auto format' came in and erased any changes I just made a few seconds ago and restored the last saved codes. I know 'auto format' could be manually click on if desired set but is there a switch to turn it off at the startup of the editor? or may I suggest have 'auto format' do it things at the time of saved and exiting the editor. this is rather frustrating |
#2
|
||||
|
||||
Ticket:
-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#3
|
|||
|
|||
thanks psp, this has now became a major issue for me that the script has evolved into 2400+ lines of code.
It takes upto 3mins to AutoFormat the script. Imagine how I feel after loosing 3mins worth of unsaved work. On top of that cpu process power jump to 70-80% during that period. As a test, after opened up the Script Editor then Close/Cancel out the Script Editor, cpu percent does not drop for the next several minutes. My guess is the Auto Format function does not exit even thought Script Editor is already closed. I went a step further and do a couple more open/close script editor. Cpu power remains 70-80% for the next 15mins. Even tried with the step above but now I exit out jd and guess what, jd gui is closed but jd process still running in taskmanager at the same 70-80% cpu power and won't fully end task untill the next 15mins. tried both on windows 8 and windows 10 please let me know if there is an advanced setting where I can simply Disable Auto Format. currently my around is annoyingly copy and paste back and forth between np++ |
#4
|
||||
|
||||
Quote:
With +2400 lines of code, you may as well start developing Java and contribute to the JDownloader project Developer instructions -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#5
|
||||
|
||||
Can you please send me such large script to support@jdownloader.org for testing. I want to test available options that might speedup the whole process.
The formatting happens in it's own thread and uses a javascript library for formatting, so performance might be bad for such large scripts.
__________________
JD-Dev & Server-Admin |
#6
|
|||
|
|||
Split the script into modules and use the 'require' method to import it into other scripts (as required).
Code:
require(myString/*myFilePathOrUrl*/);/*Loads a Javascript file or url. ATTENTION. The loaded script can access the API as well.*/ /* Example: */require("**External links are only visible to Support Staff**); |
#7
|
||||
|
||||
With next core update, I've removed the auto format on editor open and also disable the editor while auto formatter is running to avoid loss of edits and tried to speedup the auto format
__________________
JD-Dev & Server-Admin |
#8
|
|||
|
|||
Quote:
Quote:
cool, thanks! now i can manually 'Auto Format' after done with debugging. |
Thread Tools | |
Display Modes | |
|
|