|
Post by George on Jan 18, 2024 12:10:28 GMT -5
For any of you who have followed the thread for the current BETA version, there have been quite a few problems related to SETUNDO and UNDO/REDO processing.
One of the difficult to correct aspects was that Profiles can have differering SETUNDO values, and some activities (like the COPY, or MEDIT commands) are required to dynamically switch Profiles to ensure data files are read/written properly. And this flipping of Profiles, if the Profiles have differeing SETUNDO values, can muck up the UNDO environment. We believe this has been properly corrected but ......
One solution is to make SETUNDO a General Options parameter rather than a Profile parameter. If we went that route, automatic conversion would be done, setting the General option to the MAX value of any current Profile.
We'd love to get some feedback as to this change.
Good? Bad? Don't care?
|
|
|
Post by Robert on Jan 18, 2024 12:47:02 GMT -5
George,
I had two reasons for the prior comments that prompted this Outreach thread. The first was to suggest a change to the architecture that would hopefully make it more resilient and less vulnerable to bugs. The second was when I thought about my own use of UNDO in profiles.
I must confess, I have no idea what all the UNDO levels are in every profile I have. I'd have to painstakingly go open up every profile and check each one of them. To be honest, I don't think much about undo levels. All I want to do is UNDO when I need to. But, since I am the same person, with the same likelihood of making typing errors - regardless of what file type I happen to be editing at any given moment - the ability to fine-tune the UNDO level based on file type is not a big seller for me. I basically want the max for every file, all the time.
But, I could do that manually, if I really wanted to. It might take me 20 minutes to open up and edit every one of them, but it's not a big deal. So I can fix that myself without any code impact on your part.
What I really want more than altering the UNDO level is a change to the overall UNDO structure and architecture. It has always seemed a very high overhead feature. So, if I have one file with 25 undo levels, SPFLite is going to open up 4 x 25 = 100 temporary undo files. Wow, that's a lot. Then, if every profile has 25 undo levels, it's 100 temp files for every open file. A high overhead, but if you want insurance against editing errors, all insurance comes at a cost.
Now, I know you can't rewrite your whole code, even if doing so had advantages, because it's bridge too far. It's just too hard. But, SPFLite doesn't live in a vacuum. We all have many editing choices. For example, when I really need to edit free-form documentation text, I use NotePad++ which I am quite spoiled by. It's undo feature is always active, needs no special user intervention to enable, and essentially has unlimited levels. And, you can undo/redo down to the keystroke level. They allow that because they in turn use an open-source edit engine and add the UI on top of it themselves.
I am not unreasonable, and I don't expect that from you. But what I find frustrating is, even when UNDO is enabled, it happens too often that I try to UNDO something and can't. Instead, I get that message about 'no more undo levels'. There is a very specific "UNDO boundary" built into the process, and if you catch it at the wrong time where you change something that is not within some kind of "editing interval", you can't undo it. For me, I have to be very careful what I do, because otherwise I can get in that "UNDO limbo" where I change something and can't undo it, and then my only recourse is a CANCEL.
I don't want to rag on you, because I know you've just been through a very long and difficult debugging session on UNDO, and now that it seems to work, I don't want you to think I am anything but appreciative about all the work you've done. But to be honest, UNDO has never really worked what I would call "well". It sort of works, and if you work within its limitations, it is certainly useful. But there have always been problems with it. I just wish it could be done differently.
R
|
|
|
Post by George on Jan 18, 2024 13:10:22 GMT -5
Robert: Keep one thing in mind, all those UNDO files are NOT kept open, they sit there un-opened and unused most of the time.
My bet is that 99.9% of other editors work on the freeform, the file is stored as just one big memory blob with embedded attribute values and CRLF (or other) delimiter between lines. And there are numerous code libraries of support for handling memory management, display handling, colorization etc. in support of that style, including usually unlimited UNDO support.
Yes, wouldn't it be nice. I can't argue that point.
I wish it could be done differently as well, but SPFLite went in another direction about 20 years ago, and we have to live with what we've got.
Internal data storage management simply cannot be altered without starting over, and we know that's not going to happen.
The checkpoint style UNDO has been optimized over and over and does its job fairly well. I don't think there is any really noticable impact to an edit session. But I agree there are still some hiccups in there.
It's the old story, give me a repeatable failure, and I'll hunt it down.
George
|
|
|
Post by Jo on Jan 18, 2024 18:37:01 GMT -5
I have about 15 different profiles, each of them has UNDOLEVELS=10. Therefore: "Don't care"
Jo
|
|
|
Post by Robert on Jan 19, 2024 10:00:10 GMT -5
Well, I just went in and manually set all of them to UNDO 25, took less time than I thought. I see that with recent changes, every profile now has its AUTONAME set to the name of the Profile, instead of NONE. If you then go and edit profile ABC that never had an AUTO file, you get an error, like ABC.AUTO does not exist. So, you are forced to change it to NONE before you can change anything else. Not a real big deal, but was just a little surprised.
R
|
|
|
Post by George on Jan 19, 2024 10:50:43 GMT -5
Robert: I noticed that as well, I'll fix it.
George
|
|
|
Post by George on Jan 20, 2024 12:24:22 GMT -5
OK, little response, and no negative's so I'm going ahead. UNDO levels will become a General Options setting. It will be initially set to the largest current Profile setting found amnongst the Profiles.
George
|
|
|
Post by Robert on Jan 20, 2024 13:01:06 GMT -5
The only trick would be managing the transition. Maybe you could keep the existing UI, but any time a profile is added or changed, you would check to see if it was higher than the current global level, and if so, you'd change the global level to reflect the new maximum level.
|
|
|
Post by George on Jan 20, 2024 14:51:37 GMT -5
Robert: The change simply eliminates the UndoLevels from the Profile data and migrates the MAX value to the General Options. The value is not removed from the Profiles in the CFG file (yet), it is simply ignored. If a user goes back a version, their old Profile values take effect.
The SETUNDO command is gone, the only way to change the value is via Options => General. Likewise, a PROF display no longer displays it.
George
|
|
|
Post by Robert on Jan 20, 2024 16:02:40 GMT -5
That seems reasonable
|
|