JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04.04.2020, 02:59
zreenmkr zreenmkr is offline
JD Addict
 
Join Date: Feb 2020
Posts: 174
Default 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
Reply With Quote
  #2  
Old 06.04.2020, 17:52
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

Ticket:


-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #3  
Old 10.05.2020, 06:15
zreenmkr zreenmkr is offline
JD Addict
 
Join Date: Feb 2020
Posts: 174
Default

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++
Reply With Quote
  #4  
Old 11.05.2020, 15:14
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,140
Default

Quote:
Originally Posted by zreenmkr View Post
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++
If I knew one I'd have already told you.

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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #5  
Old 11.05.2020, 17:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

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
Reply With Quote
  #6  
Old 12.05.2020, 13:01
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

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**);
Reply With Quote
  #7  
Old 12.05.2020, 13:18
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,342
Default

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
Reply With Quote
  #8  
Old 20.05.2020, 02:44
zreenmkr zreenmkr is offline
JD Addict
 
Join Date: Feb 2020
Posts: 174
Default

Quote:
Originally Posted by pspzockerscene View Post
you may as well start developing Java and contribute to the JDownloader project
haha i wish, for now just trying to mash things up to get the work done.

Quote:
Originally Posted by mgpai View Post
Split the script into modules and use the 'require' method to import it into other scripts (as required).
i've tried that before, the problem is debuging is not as friendly. error just point to the require file and not where or what.

Quote:
Originally Posted by Jiaz View Post
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
cool, thanks! now i can manually 'Auto Format' after done with debugging.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 11:41.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.