Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ronning out of Undo
#3
It's almost impossible to say how many Undo you can do.

QB64PE basically makes a copy of your program with every change you make, and that's the undo file.

For example, let's type a program together:

PRINT "Hello World"

Now, what does that undo file look like?
PRINT
PRINT "Hello
PRINT "Hello World"
....

Basically, it's a copy of your program saved over and over and over, as you make each change.  In this case, that's 3 entries in that undo file.  Not a large file and nowhere near any undo limit...

But say that file was 1000 lines long.   It'd save those 1000 lines *WITH EVERY CHANGE TO YOUR CODE*, so when you hit UNDO, it'd revert back to what your program was 1 change ago.

So if your program was using all short lines like:

DO
    PRINT
    x = x + 1
    y = y  + 1
and so on...

That's not going to use a lot of memory to store that program in the undo buffer.

But if the program was more complex:

DO
   _UPRINTSTRINT(xpos, ypos), "This is a longer string of stuff", 47.2, other_flag_maybe
   x_upper_limit_for_my_graphics =  x_upper_limit_for_my_graphics + 1
   y_upper_limit_for_my_graphics =  y_upper_limit_for_my_graphics + 1
and so on...

That's obviously going to create a much larger BAS file, and as such, it's going to use a LOT more of the undo buffer with each save of the file.


So how do you know when you've hit the limit??

It all depends on the size of your program.

The default undo buffer is 100MB in size.  If your program is 1MB in size, then you can basically save 100 copies of it in memory -- 100 undos.   IF your program is 100kb in size, then you can basically save 1000 copies of it in memory.

Your limit is based off the size of your program, and how many copies of it you can cram into it's total size.  (Default 100MB.)


If that 100MB isn't large enough (and it's usually not for my personal needs), then I suggest changing that size to something you find more suitable.  I tend to change mine to 1000MB, whenever I grab a fresh version of QB64PE for things.  Smile
Reply


Messages In This Thread
Ronning out of Undo - by PhilOfPerth - 05-11-2024, 12:09 AM
RE: Ronning out of Undo - by TerryRitchie - 05-11-2024, 12:15 AM
RE: Ronning out of Undo - by SMcNeill - 05-11-2024, 12:36 AM
RE: Ronning out of Undo - by SMcNeill - 05-11-2024, 12:19 AM
RE: Ronning out of Undo - by TerryRitchie - 05-11-2024, 12:38 AM
RE: Ronning out of Undo - by SMcNeill - 05-11-2024, 12:51 AM
RE: Ronning out of Undo - by TerryRitchie - 05-11-2024, 12:54 AM
RE: Ronning out of Undo - by PhilOfPerth - 05-11-2024, 01:02 AM
RE: Ronning out of Undo - by SMcNeill - 05-11-2024, 01:10 AM
RE: Ronning out of Undo - by PhilOfPerth - 05-11-2024, 01:21 AM
RE: Ronning out of Undo - by bplus - 05-11-2024, 11:42 AM
RE: Ronning out of Undo - by PhilOfPerth - 05-11-2024, 11:18 PM
RE: Ronning out of Undo - by SMcNeill - 05-11-2024, 11:32 PM



Users browsing this thread: 2 Guest(s)