Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Editor sudden speed fall to about 0.1 fps after 3500 lines...

Author
Message
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 19th May 2011 01:38
...simply to put...

...now what?

The editor handles everything fine before the 3500 line, but the things after can only be edited at 0 fps. I want to make it clear, my code is longer than 3500, still before that editing is awesome, after it is a nightmare.

-In.Dev.X: A unique heavy story based shoot'em ~25%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th May 2011 01:42
Are you splitting up your code into smaller files?

I've only ever come across that in the earlier days of the Atari ST with large source files...

Warning! May contain Nuts!
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 19th May 2011 10:35
Nope, I'm not... and i don't want a freak workaround, this is the time of CPU's with Ghz's, Commodores could store and handle code like this with no problem!

I've read some serious codes before like the source file of Ermes' ESF which was as i remember more than 30K lines, with no problem. Just because that wasn't not mine it didn't lag?!

-In.Dev.X: A unique heavy story based shoot'em ~25%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 19th May 2011 11:30
Which editor are you using?
Have you tried other editors?

I use Indigo and have never had the problem you are talking about. Maybe you should try that?

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 19th May 2011 11:43
How much ram do you have? it might be a problem if your program only has access to a small amount of memory.


Tell me if there's a broken link to images in a thread I post, and I'll fix 'em.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th May 2011 12:11
You need to start splitting up your code in seperate source files, having 1 main file with 3500 lines of code can be extremely confusing. My current project (my sig) has hit the 7777 mark, and I have about 12 different source files, none being over 800 lines of code.

I remember you having a slow computer with low specs, could it be that? What editor are you using?

TheComet

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th May 2011 12:30
Firstly we need to know which editor you refer to, there are many different ones out there, including different official editors.

You'll need to check your editor options. Some of them continually update the IDE panels, and you may be updating something that you don't actually use.

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 19th May 2011 13:35
The standard editor.

512 ram is not enough?

I kinda like it in one piece, i don't get confused at all. And switching from one piece to an other would frustrate the hell out of me on the long run i guess.

How do you switch to a different editor? how do i install it? I'm so happy this one finally doesn't give me stupid error messages though everything has been untouched in the options since day 1, it was crap for months, and suddenly it is fine. (?!)

-In.Dev.X: A unique heavy story based shoot'em ~25%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 19th May 2011 13:44
Quote: "
512 ram is not enough?"

512... megabytes?

What OS are you running?

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th May 2011 14:17
I run on 1G ram and I have slowdown issues but not usually with an editor unless the background programs start kicking in. I seriously need to put more ram into this laptop.

Even XP will eventually (after a week) will have slowdown issues with 512Mb. Especially if you put an anti virus and firewall on it.

I used to be in Quel's position, everyone else had bigger better computers and mine took 20 minutes to boot up. Now I have 4 PC's and 3 laptops. I only use this one I'm on though for programming.

Warning! May contain Nuts!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th May 2011 14:20 Edited at: 19th May 2011 14:22
Quote: "I kinda like it in one piece, i don't get confused at all. And switching from one piece to an other would frustrate the hell out of me on the long run i guess."

I can understand that we all like to organise our code differently. I've never met two people who do it exactly the same way (which is one reason I like Visual Studio) but there are times when you have to be flexible.

If the IDE won't run on your system at over 3500 lines you might have to split your code up.

Being flexible is not so much a benefit as a necessity for programmers. We all have to work around constraints of one sort or another 90% of the time.

Perhaps someone will write a better IDE someday or maybe some of the others out there will meet your requirements (someone mentioned Indigo?) but if none of the suggestions here are ideal you might have to accept the least unacceptable one. A pain I know...

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th May 2011 14:48
If you are running Win7 or Vista, then it's obvious that your system has been compromised. Win7 uses >1 GB, and vista requires such an immense amount of RAM that you don't have enough atoms in the universe to create a chip large enough to contain it.

TheComet

=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 19th May 2011 18:37
I find Codesurge to be a more lightweight and efficient Editor than the Synergy Editor which comes bundled with DBP these days; altho I can't remember when I last had only 512mb of ram, I've never had the slowdown issues you have described.

I used to just write single file sources, one or two of my projects have exceeded 20k lines; but now I understand better how to split my code up into multiple source files it really does make life soooo much easier.

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 19th May 2011 18:59
Vista wouldn't run in 512MB.

Splitting the code into more files probably wont matter. Look at the FPSC source code. It's over 18,000 lines in one file.

The problem is most likely the lack of RAM. The days of running with less than 2GB are essentially over. I don't think I've been able to run any system reliably with less than 1GB since Windows 98...

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th May 2011 14:37 Edited at: 20th May 2011 14:43
Yeah, 512MB ram is by today's, standards pretty low. My netbook has 1024 and it still seems as slow as a dog doing basic things likle loading text up, and that uses XP. 512 MB memory was impressive in the days of windows 95 (although it was overkill really) but now it is literally bare minimum. For instance my system is getting on now, and I am sure a new system would blow mine out of the water. However it is still a quad core, and has 8 Gig of memory. 512 MB these days is nowhere near enough for trouble free computing.
Adding more memory to your system (if possible), would improve it all round. The less time it spends paging memory to the hard drive the faster your computer will run. It does sound like you need an upgrade. You have to remember Windows uses memory and modern O/S's use a lot. You can probably get away with it with windows XP, just, but any newer and you will have a computer that either runs slower than an old 286, or doesn't even boot.
A lot of people don't even think that the O/S takes up system memory, but they do. As much as they can get there grubby hands on. So on 512 MB you will be in virtual memory before you have even logged in.

http://s6.bitefight.org/c.php?uid=103081
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th May 2011 14:43
And after you add some more RAM, go ahead and defragment your hard drive It could use a good clean up, and it will certainly speed up things.

TheComet

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th May 2011 14:48
Defrag it? Give that poor HDD a break, it sounds like it has been working itself to death for some time! ;p

http://s6.bitefight.org/c.php?uid=103081
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th May 2011 14:49
Could be Quel's running XP. A lot of guessing going on here...

Quel, did you solve your problem?

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th May 2011 15:05
Baxslash, XP would still be running in virtual memory with 512MB from bootup. You need 1024 for it to run at full capacity. Even then it could use a little extra when running other apps, which knock the free memory below the physical ram. I hardly call it guessing either, more an informed opinion. Quel stated he has 512MB, and that is simply not enough memory for his computer to run properly. Unless he has windows 98 installed. My netbook has 1024mb and runs xp. It is a dog, and I know full well if I upped it to 2 Gig it would run way, way better. How it would run with 512 I would not like to see! It would be painful.

http://s6.bitefight.org/c.php?uid=103081
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th May 2011 15:23
My 300 year old laptop runs XP on 512 and I was writing 8-10K line programs on that with no slowdown 2-3 years ago, before I got my desktop.

Whether it's running in virtual memory or not it ran fine for me then...

I'm not saying you are 'just guessing' although it seems to me that 512Mb wasn't causing this problem for DBP two years ago (on XP) so why would it cause it now (if he's running XP)?

I was also hoping to prompt a response from the thread originator

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th May 2011 16:00
Quote: "XP would still be running in virtual memory with 512MB from bootup"


no, it can run on less than 256MB of physical RAM.
But if you add Antivirus, Office quickstart, Adobe quickstart, email, a couple of apps running in the background, a few IE tabs...

try running with no other applications (including IE!) and see if there is a difference. If so, then memory is most probably the issue.

You could also exclude your projects directory from AV scanning, that may help.

DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th May 2011 19:04
Dear me, XP does run in virtual memory as soon as it loads if using 512MB. Why do you think a system speeds up because of extra memory? It only does that because it no longer has to page out memory as much. With just 512MB you will be using page files I guarantee it, just not as large as if you were using 256. XP can actually run in 128 MB but why would you want to? As you say there are the added things needed now such as antivirus and firewall that will help eat your memory as well. Hopefully as baxslash said, the original poster will give a bit more info.
But all other things aside, more memory will make it a more pleasant experience to code anyway. Plus we don't know HOW many things are running in the background on his system. Hard drive performance is an issue here too, as a slower HDD will result in even slower paging calls.
Of course it could be just a problem with that DB setup for some reason, but I doubt it.
Baxslash, I am not surprised your horse powered laptop was ok really. But it depends on his specs (onboard video using memory or not? for one example) and also what programs are running in the background. If several programs are accessing the page files it will run a fair bit slower. A fresh install of DB would probably be a good idea if he hasn't already tried that. Making sure to back up the project first of course.

The easiest way to know you are hitting the virtual memory limit is how long the system takes to recover from memory hungry apps. If you run a game and quit, and it seems to take as long or longer to actually exit, than it does to load up, then your memory is being freed from the page file system.
For instance on my main rig if I play LOTR and exit it is instant. However on my 1024mb based machine it takes forever, and you do not want to attempt alt tab!
There are lots of programs out there that add to your startup and run in the background. Some people are aware of them some aren't. They are normally the cause of most problems people can get on the PC. I remember one fellow bringing his computer in several times with some weird quirk he said he was getting, in the end it turned out it was a stupid program included with his genius mouse, that had a pair of eyes following it's movement on screen. I had never seen it because I always avoided loading useless programs on systems, and a program for a mouse that works already by simply plugging it in, seems a waste of time to me.
The 512mb memory is probably not the sole reason for this, but that in combination with other things such as AV real time scanning and other programs running in the background probably are. It certainly sounds like the PC suddenly can't cope anymore for some reason, going from the original description. It may even be an idea to actually check how much memory is free on a new project, and how much is free on the offending one.
Unfortunately, PC fault diagnosis can't really be done very well via forums. We can only really give possible suggestions.

http://s6.bitefight.org/c.php?uid=103081
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 3rd Jun 2011 18:37 Edited at: 3rd Jun 2011 18:45
Two things...

Just shame on everybody whose immidiate reaction was "ONLY HALF A GIG RAM OMG OMG OMG YUK BLAH SOMETHING SOMETHING!!!", this is progress you say, to have more than 1Gb just for the OS?

Second... SURE, i'm listenning to 10 songs on Youtube at the same time, that was the problem!.. What 'Pro' this forum is, why would i come here to hear all these IT Crowd nonsense...

PS.: For the first group, and TGC in particular, try to edit a 150kb txt with the notepad. See... no lag.



EDIT:
I just read now, WHAT? 512mb ram in the Win95 times? 1G under 98? What were you smoking people... those just simply didn't exist then for home use. Though no matter what strange corrupted images are floating around in many of yours' heads, i still recommend the original P.S. of this comment.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Jun 2011 18:55
Oh forget it...

I was going to reply and then I saw the futility of it.

Good luck


DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Jun 2011 19:27
I am in concurrence with baxslash, no one was knocking you for having 512MB. Just suggesting you consider your system specs in regard to the problem, and possible programs running in the background. I do not mean any programs you run yourself, I mean programs which load in the background upon boot up, antivirus, firewall etc. The fact that no one else seems to have had the problem even with the same amount of memory you have, means it is probably specific to your machine for some reason. That could be you have some extra widgets loaded up, causing your system to have less memory, or it could be something else entirely.

It was only a suggestion. You could have replied stating the facts: You have nothing running in the background besides the essentials. You have a video card that does not use onboard memory. You have x amount of free memory when the problem occurs. Instead you fly off the handle and respond with sarcasm. Good luck.

http://s6.bitefight.org/c.php?uid=103081
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 3rd Jun 2011 19:42
Quote: "Just shame on everybody whose immidiate reaction was "ONLY HALF A GIG RAM OMG OMG OMG YUK BLAH SOMETHING SOMETHING!!!", this is progress you say, to have more than 1Gb just for the OS?"


Just saying it's probably the cause of your troubles



Tell me if there's a broken link to images in a thread I post, and I'll fix 'em.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Jun 2011 19:43
Shame on anybody who can't ask a question to something they don't know the answer to and then critisises the people who try to help.

The way to solve any logic based problem which has two different outcomes is to look at what is different between the two equations.

My computer + DBP Editor + 3500 lines of code = No Problem
Your computer + DBP Editor + 3500 lines of code = Problem

Spot the difference?

Is it so strange then for others to look at what is different about your computer in order to find the solution for you? No.

Are we perfect? No, but we are trying to help here and this is the second/third time you've been offensive to people trying to help you in threads I've been watching over the last few weeks.

Try to be nice to people who are trying to be nice to you (that includes me)...

Tom0001
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 3rd Jun 2011 20:34
@Quel, in a way you tried to use the fact that you had 10 Youtube videos open/downloading/whatever as a means of undermining the fact that having more RAM available would have solved your problem.

...In a way I fail to see how this would have affected it as that's more dependent on your network connection speed than available RAM, unless you were playing all of them at the same time, in which case I'm prompted to ask what the heck were you thinking?! ...And also having more RAM would have solved the problem in that case.

In both cases, the solutions presented to you were both very viable and...actually correct, in large ways.

...But yeah seriously you should consider upgrading your machine. Like, right now, man...really.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 3rd Jun 2011 21:45
Quote "I just read now, WHAT? 512mb ram in the Win95 times? Those just simply didn't exist then for home use"

They did exist.

I had 512MB in win95 times even though 32MB could run fairly well, which was what I first started with. Overkill as I said, Win 95 didn't really use more than 256MB anyway. But hardware could support it and I had in readiness for 98. Plus I worked in the industry and couldn't resist upgrading whenever there was a major price drop, which was often. I have always gone overkill on memory if I can afford it, even with my Amiga 1200 which had 18 MB of ram instead of the basic 2MB as standard.

http://s6.bitefight.org/c.php?uid=103081
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 3rd Jun 2011 22:46
I used to have win98 on 128mb, it ran pretty badly. 20 minutes boot up time. I upgraded another 128mb. Major difference. I can understand those with lack of money and have to bare with a low spec machine. I've had years of it.

Although my Amiga 1200 had an extra 32mb memory, making 34mb total, I had a 68030 50Mhz processor upgrade and a 1gb HDD.

These days I'm still running on low spec but just good enough to get by. A lottery win would help me buy an Alienware laptop.

Warning! May contain Nuts!
tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 3rd Jun 2011 23:09
Install DBPro on a better computer and see what happens.

Use a different IDE and see what happens.

If the source is something private and important, give it to a DBPro user you trust and ask what happens.

Look for what might make your source different than other people's source... or get a big project (FPSC) loaded into the IDE and see what happens.


Please note: All of the above options are better than being sarcastic and unappreciative of people trying to help you with a problem they do not have themselves.


A 3D marble platformer using Newton physics.

Login to post a reply

Server time is: 2026-07-10 19:25:05
Your offset time is: 2026-07-10 19:25:05