Replies: 5 comments 1 reply
-
I think this modification can improve the deployment and installation speed of DecApp with web pages very significantly |
Beta Was this translation helpful? Give feedback.
-
This is a great optimization that could theoretically speed up publishing and installing apps. Can other files be put into the zip besides the web folder? In theory, except for the pre-dependent files during installation (such as the previously designed version-dependent configuration), other files can be entered into zip, right? |
Beta Was this translation helpful? Give feedback.
-
Complet code implementation: Test web folder: 15 files, total size 5734750 byte Old logic: 31s to download, 5734750 byte New logic: 2s to download, 585972 byte |
Beta Was this translation helpful? Give feedback.
-
It is somewhat similar to the logic of the ood-daemon service management service package, but after the entire file is packaged into a zip, it may not be possible to download a single file inside, and it is only applicable to the case where the entire package is downloaded Another option is to use the Dir Object mode, which packs the entire folder into a Dir, and the content is in the body part, which is also similar to the zip package mode, but it can have internal substructures |
Beta Was this translation helpful? Give feedback.
-
Optimization: DecApp's deployment and installation process
Currently, due to the implementation limitation of NamedDataClient, the upload and download component of DecApp, when uploading/downloading a folder, the operation is performed serially for each file in the folder. For each file, a separate tcp/bdt connection is established and data is transferred on the connection. When there are a large number of files in the folder, this operation becomes inefficient and the whole upload/download action fails when any file is wrong
Therefore, when uploading the web folder of DecApp, the web folder of DecApp is uploaded as a packaged folder by default, and AppManager automatically detects whether it is a packaged folder when downloading DecApp.
Upload side (cyfs deploy).
- Call pack-tool to pack the web folder and generate web.zip file after packing.
- Use web.zip file to upload instead of the original web folder.
Download side (AppManager):
- When installing the app, determine if the web.zip file exists
- If there is, extract the web.zip file and use it as the original web folder.
- If not, continue the original logic
Beta Was this translation helpful? Give feedback.
All reactions