ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [open] Change saved vars file (https://www.esoui.com/forums/showthread.php?t=8426)

Rhyono 03/23/19 01:48 PM

[open] Change saved vars file
 
The indention in the saved vars is done by 4 spaces per level. Why not use tabs? I took a 1.5MB save file, converted every 4 spaces to 1 tab and the file size was literally halved.

I don't know how much those extra characters affect load/save times, but even if they don't: I know I wouldn't mind the extra HDD space.

Baertram 03/23/19 05:00 PM

Does ESO support shrinked lua files (removing all spaces where not needed?), like minimzed javascript files e.g.?
Maybe one can even minimize the files of the SVs then (if you like to cuz it breaks readability).

Drummerx04 03/28/19 03:38 PM

Quote:

Originally Posted by Baertram (Post 37544)
Does ESO support shrinked lua files (removing all spaces where not needed?), like minimzed javascript files e.g.?
Maybe one can even minimize the files of the SVs then (if you like to cuz it breaks readability).

Yes, the Lua interpreter in ESO does support a "shrunken" format. The language grammar itself does not set any requirements on the presence of whitespace beyond using a single whitespace character to separate two s-expressions.

Most programming languages that I've seen have no specific requirements for whitespace with python and makefiles being the most notable exceptions.

On an interesting side note: Code65536 and I encountered a bug (that we haven't seen again) where the saved variable files actually got written to disk without the formatting whitespace.

sirinsidiator 03/28/19 04:36 PM

Quote:

Originally Posted by Drummerx04 (Post 37584)
On an interesting side note: Code65536 and I encountered a bug (that we haven't seen again) where the saved variable files actually got written to disk without the formatting whitespace.

It's not a bug, it's a feature of the new auto-save. It skips writing whitespace characters in order to save time.

Rhyono 03/28/19 04:58 PM

Well if ZOS found writing whitespace to be that much slower, then cutting the whitespace down by 75% is important.

Drummerx04 03/28/19 06:54 PM

Quote:

Originally Posted by sirinsidiator (Post 37585)
It's not a bug, it's a feature of the new auto-save. It skips writing whitespace characters in order to save time.

Oh nice. I knew they had added auto-save, but I wasn't sure whether that was the cause. Thanks!

SimonIllyan 04/11/24 08:16 AM

Quote:

Originally Posted by sirinsidiator (Post 37585)
It's not a bug, it's a feature of the new auto-save. It skips writing whitespace characters in order to save time.

Sorry to jump into this old thread, but… can this behaviour be forced? I mean, it would be nice to have those excessive whitespaces reduced at every write, not just auto-save. They are needed for debugging, otherwise… not so much. And the reduction of file size can be serious.

Baertram 04/11/24 12:18 PM

No, unfortunately it cannot.

ZOS_DanBatson 04/15/24 06:03 PM

Might as well keep this ask open though. It's on my agenda to offer some more compression options for Saved Vars, this specific ask included.

Anthonysc 04/15/24 07:51 PM

Quote:

Originally Posted by ZOS_DanBatson (Post 49832)
Might as well keep this ask open though. It's on my agenda to offer some more compression options for Saved Vars, this specific ask included.

Not going to lie, that would be pretty awesome. My PvpAlerts savedvariables is over 15MB now, and that's after I implemented a function to purge it of some old data that wasn't needed anymore. I haven't enabled that function in the release version yet so I'm betting other people's are sitting upwards of 20, 25MB if they've never started from scratch. (Replacing spaces with tabs cut the file from 15MB to 8.7MB.) KillCounter savedvariables is similarly hitting over 10MB. These addons are definitely not typical, they log a lot of information about various PVP encounters, but something to cut them down beyond hacking in new code functions to the addons themselves to do cleanups would be very welcome.

sirinsidiator 04/16/24 05:12 AM

Quote:

Originally Posted by ZOS_DanBatson (Post 49832)
Might as well keep this ask open though. It's on my agenda to offer some more compression options for Saved Vars, this specific ask included.

Oh nice. I know it's not compression related, but still somewhat on topic, so when you are looking into the saved vars, could we please also get an option to have it save string keys in alphabetic order instead of randomly sorted? That would make debugging saved vars so much easier, as it would allow to easily compare two copies of a file.

Baertram 04/16/24 07:04 AM

Quote:

Originally Posted by sirinsidiator (Post 49839)
Oh nice. I know it's not compression related, but still somewhat on topic, so when you are looking into the saved vars, could we please also get an option to have it save string keys in alphabetic order instead of randomly sorted? That would make debugging saved vars so much easier, as it would allow to easily compare two copies of a file.

+1
!Yes please!

Toirealach 04/19/24 03:58 PM

Quote:

Originally Posted by Baertram (Post 49840)
+1
!Yes please!

+99999999 please please please!


All times are GMT -6. The time now is 04:00 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI