Merged
Conversation
implementation with the copy of the configuration file parallel. Previously, the files were sequentially copied and the copy instructions called `os.system` besides being fragmented along the file. The new approach adopted implements a more idiomatic form to treat desktop environments and a lazy copy process, that is, in the construction of the object, based on the user's and the preferences of the user, the set of files to be copied is created to, only with the call of the `run` method, to be performed in parallel. In order to increase the maintenance and legibilization of the code, the attributions were properly separated and the type notes, in most cases were created. The original attributions of this file were divided into: - Prepare the environment; - Copy; - Collaborative actions; The environment preparation actions have been moved to the `setup` method which, thanks to 'SandwichMeta', are executed before `run`, `run` which contains the actions to be executed - it is indicated to execute '__parallel_copy' within the method -, the copy actions have been abstracted in '__parallel_copy', the changes after 'run' must be in 'teardown'.
issue vikdevelop#414 of SaveDesktop - the original repository. It fixes the visibility of the `__parallel_copy` method - renaming it to `_parallel_copy` -; It also decreases the number of 'MAX_WORKERS' from 5 to 3. Future actions include reviewing the method of copying user data from Flatpak applications in view of the high consumption of computational resources and notorious delay, which hinders the initial objective of using parallelism.
and fixes the saving of the data files of all flatpaks despite not selecting them. Check out [this comment](vikdevelop#414 (comment)) on issue vikdevelop#414.
Owner
|
I tried it and everything works perfectly – great job! |
vikdevelop
added a commit
that referenced
this pull request
Jul 8, 2025
…y upgrade (#420) During thorough testing following the config.py upgrade from PR #420, I identified and resolved several issues: - Fixed incorrect saving of folders in the archive (e.g., ~/.fonts exported only contents, not the ./fonts folder as expected) - Ensured the ‘cache’ folder for Flatpak application data is properly excluded Additionally, updated related scripts: - main_window.py and periodic_saving.py now exclude saving_status and cfg.sd.zip files during save - synchronization.py: simplified condition for removing sync_status These changes should make the export/import process more reliable and consistent. Still, thanks to contributor @ArthurValadares for his work on the config.py upgrade!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request
Description
Implementation with the copy of the configuration files in parallel.
In order to reduce the time needed to copy the files from the source directories, changes were made to the structure that was previously based on calls to
os.systemusingshutilin order to useThreadPoolExecutorto allow copying in parallel; by default, 3 copies are made at the same time.The calls were fragmented throughout the file, they were consolidated based on whether they were mandatory, optional or within the scope of the configuration. In addition, the appropriate documentation has been added.
Related Issue
Changes Made
DesktopEnviromentenum.Testing
Select the installation methods on which you tested your changes:
Checklist