Thread Tools Display Modes
03/23/19, 01:48 PM   #1
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
[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.
  Reply With Quote
03/23/19, 05:00 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
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).
  Reply With Quote
03/28/19, 03:38 PM   #3
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
Originally Posted by Baertram View Post
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.
  Reply With Quote
03/28/19, 04:36 PM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Drummerx04 View Post
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.
  Reply With Quote
03/28/19, 04:58 PM   #5
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Well if ZOS found writing whitespace to be that much slower, then cutting the whitespace down by 75% is important.
  Reply With Quote
03/28/19, 06:54 PM   #6
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
Originally Posted by sirinsidiator View Post
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!
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] Change saved vars file

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off