Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ide slowdown with more than 1000 lines.
02-09-2014, 10:47 PM,
#1
Ide slowdown with more than 1000 lines.
Hi all.
I am fully aware that I am reusing a previous thread subject, just adding another zero. Smile

The thing is that I am experiencing an exponential lag in the X3 IDE on Windows XP due to my source file size. It is now some 3600 lines, including braces, comments, empty lines etc.
In order to be able to start working when loading the IDE, I press Ctrl-End
so that the IDE can chew through all the lines. This is a process that now takes some 10 minutes. During this my 2-kernel CPU uses 50-70%. If I don't jump to the end, but just press cursor down to scroll, the IDE will slow down, and scroll about 1,5 lines per second.
Also editing is now quickly a matter of typing blindly, so I save often in order to speed things up to "slightly-below-normal".

I also had trouble in the beginning with the IDE invisibly corrupting source files and failing to compile (stray returns, linefeeds had to be cleaned with an editor like Editpad) but that has ceased.

I saw in the previous "ide slowdown" thread a few tips that I will use, such as upgrading to X4, download drivers etc. Removing trailing blanks (thanks Editpad!) didn't help however. I will post my progress in this matter in a couple of days, just posting this in order to warn others, or flagging a potential limitation, "raising the subject", etc etc.

Wimpy
Windows, Icons, Mice and Pointers
Reply
04-09-2014, 11:59 AM, (This post was last modified: 04-09-2014, 02:38 PM by wimp#1.)
#2
RE: Ide slowdown with more than 1000 lines.
OK, Now I have downloaded the X4 Easypack and using it. Jumping to the last line went fast but then when scrolling upwards... a window-height of lines scrolls by and then there is a three second pause before scrolling continues. This repeats; scroll, pause, scroll etc.
Selecting the IDE window (after editing in this web browser) takes 2 seconds as well!
This is a P4 3GHz with 1.8 GB RAM, it should be sufficient, right? My Embarcadero Delphi installation works fine and swiftly.
OK I turned off auto completion and now X4 is suddenly decent. Did the same tweak in X3 to no avail.
When the recently reported mixed-pin bug is removed I might switch to X4.

By the way, I just copied this little X3 environment to a single core Dell Celeron. >> CPU got stuck at 100% usage for several minutes.
I suspect the python on the back side is doing something inefficiently, making this a "Killer Application" - something that kills an ordinary office PC.
If disabling auto completion speeds it up, maybe things like color coding of reserved words etc is a slowing process?

Wimpy
Windows, Icons, Mice and Pointers
Reply
04-09-2014, 09:20 PM,
#3
RE: Ide slowdown with more than 1000 lines.
.. and at home on an Intel Core i7 2.9GHz it took a couple of minutes to jump to the last line with X3.

Well I guess I have to split my monolith into fragments.
Windows, Icons, Mice and Pointers
Reply
05-09-2014, 02:14 AM,
#4
RE: Ide slowdown with more than 1000 lines.
Hi Wimpy,

My normal PDE files are over 5,000 lines and P-IDE is not slow even on my P4 machine. It takes just a few seconds to scroll down from top to bottom using the cursor key.

I have 3 suggestions for you.

1) Your PC might (most likely) be in dire need of RAM. Swapping in and out of virtual memory on the hard disk is a recipe for the slow PC. You can check from the task manager. If your RAM usage is over 75% of physical RAM size, you should consider adding extra RAM. If you have sufficient RAM, next item to check is the hard disk space left and fragmentation. This is second most common reason for the slow PC.

2) If your code is over 3,000 lines as in your post, you may consider using your favorite editor to edit the code and use P-IDE to compile like the good old days. You can take advantage of both choice editor (I use SyncWrite for smaller files and UltraEdit for big files) and convenience of Pinguino library.

3) P-IDE doesn't support multiple source files (I mean multiple object files, multiple source files are merged into one source file for compiling by IDE) and also doesn't support batch processing with variable definition. You can just go the traditional way of using a Makefile to control the compiling, linking and uploading process. You will need to use the original function names in the library, not the translated names from the PDL files.

DJ
Reply
05-09-2014, 04:34 PM, (This post was last modified: 05-09-2014, 04:37 PM by wimp#1.)
#5
RE: Ide slowdown with more than 1000 lines.
Hi DJ

Well, my computer(s) don't rattle from overcrowded RAM, I can quickly and easily start a new Chrome window to write a complaint Smile It is just the editor that is the problem - the X4 is much faster but I read about a pin assignment bug so I hesitate to upgrade. Compiling goes reasonably fast on my X3 without much disk rattle. (Though not as quickly as Delphi doesWink). I was a little surprised that the quad core i7 with 8 GB RAM was so slow on this as well. Maybe there is another X3 available out there, my build is "unknown".
So you mean that #include files are really included, like they are i PicBasic Pro? I really expected a multitude of obj-files linked together, and hence a multitude of extern -references... Maybe lazy me could try to snip-snip the code into several pde-files and only compile the first one. With appropriate #include statements.

Have a nice weekend!
Wimpy
Windows, Icons, Mice and Pointers
Reply
05-09-2014, 06:04 PM,
#6
RE: Ide slowdown with more than 1000 lines.
Actually I made a wrong statement. #include files are not merged into a single physical source file for compiling. They are just included during the compiling into a single obj file. The effect is same as if they are included in single source file including the variable scope. That means every variables declared as global in the library C file are also global in the pde file without #extern statement.

Also watch out the #if statement. If you #include different files by #if & #else condition, both files will be added. IDE doesn't recognize #elif statement, either. I don't know whether we can call it a bug or a feature.
Reply
05-09-2014, 06:32 PM,
#7
RE: Ide slowdown with more than 1000 lines.
See the make files...

John
Reply
09-09-2014, 11:17 AM,
#8
RE: Ide slowdown with more than 1000 lines.
Nope, I just split my source file and that road was a difficult one.
References to SD and CDC were unknown in the second file. Apparently a lot of automagics must be manual in #include-files.

Think I'll stumble on with my X3 a bit longer.
W.
Windows, Icons, Mice and Pointers
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)