-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Support for saving .sy files in the single-line format #8712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Actually, we thought about it before, but at that time because some users need to use git management (they need diff text), such as (in Chinese): It is also because of this requirement that we retain blank characters. If we want to remove it, maybe we can only add one setting item: whether to use the single-line format, which is enabled by default in the new version. |
@88250 A modest proposal, "Save with a single line" is supposed to be disabled by default, because:
|
Yes, the added option is turned off by default, but it is turned on by default for users of newly initialized configurations. |
@88250 |
Thanks for reporting it.
…---Original---
From: ***@***.***>
Date: Tue, Jul 11, 2023 13:35 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [siyuan-note/siyuan] Support for saving .sy files in thesingle-line format (Issue #8712)
@88250
It seems that this setting is not searchable in the search panel❓
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Possible performance improvement of more than 20% at multiple places
In what scenarios do you need this feature?
Hello team,
I would like to share a performance improvement idea.
Currently, Siyuan stores a formatted version of JSON in
.sy
files which results in many\t
and\n
characters being saved to the file. Following is a table showing number of extra characters per file (for some files inSiYuan User Guide
)Doing the same counting for all files under
SiYuan User Guide
and summing it up, we getThe "Notebooks which users will create (over years)" will generally be way larger than "SiYuan User Guide". So, the percentage of "tabs and new line" characters could go even upper.
Describe the optimal solution
Based on numbers shared above, I feel if we store raw JSON (without any formatting), then it would result in:
Most of the above improvement are linked to each other, and the primary source of all improvement is 1 (i.e. smaller file/note size on the storage disk)
The performance improvements sum up to a noticeable amount as the note/doc size increase. For example, for basic operation like opening a note, editing it, saving and syncing it will look like:
.sy
file from the disk)\t
and\n
characters are not loadedI believe the expected improvement in most of the above operations is about
22%
to35%
(based on the tables shown above in the previous section)Thank You 🙏
Describe the candidate solution
No response
Other information
No response
The text was updated successfully, but these errors were encountered: