Skip to content
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

Discard history on project-file save/load #2468

Merged
merged 2 commits into from
Dec 21, 2018
Merged

Conversation

jonoomph
Copy link
Member

Merging changes from #2400 into develop, to reduce size of history in project file. Still need to revisit in the future to see why nested history was happening in the project file (ballooning the file size)

ferdnyc and others added 2 commits December 20, 2018 16:25
* updates.py: add newline at end of file
* conversion: total_size() for data structs
* project_data: Log load and save operations

Believe it or not, in all the logging OpenShot does, never was the fact 
that a project file was being loaded or saved actually logged as such. 
Now it is, complete with the `file_path`.

* project_data: Discard history

On both load and save of project file data, any `"history"` in the JSON 
will be discarded, replaced with an empty struct:
`{ "undo": [], "redo": [] }`

Temporarily, while testing the feature, the total size of the data 
structure being discarded will first be computed and logged.
```
project_data:INFO Discarding history of size 105246892 bytes
```
…urpose. Soon we need to revisit this and try and improve the persistance of history (within reason to a few dozen changes perhaps), and ensure we don't allow nested histories (since history is an attribute of a project object).
@jonoomph jonoomph merged commit beec2f8 into develop Dec 21, 2018
@jonoomph jonoomph deleted the smaller-history-test branch December 21, 2018 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants