ZORALab / Hestia

One Peaceful Frontend+Backend Software Library Suite.
https://hestia.zoralab.com
Other
19 stars 1 forks source link

Develop A Directory-Oriented Way to Provide PWA Cache Input #29

Closed hollowaykeanho closed 1 year ago

hollowaykeanho commented 1 year ago

Description

Please provide a short description of what feature you're looking forward to
enhance below. Please include the story behind your idea as well to give a
better visualization of your idea.

Originally, the PWA cache system was to walk through every directories' __caches.toml data file where it lists all the caching URLs for that particular contents. Due to this recursive scan, it caused extreme performance issue tracked under Issue #26 . Since, then it was removed in commit https://github.com/ZORALab/Hestia/commit/a90901d9b7535c1c9caeb0f28fa8fe909383b5cd and the setting was reverted to site level Hestia.PWA.Cache table. With this compromise, Hugo is back to reusable mode again.

While doing so gain in performance, consolidating the entire repository's caching URLs under a single file can be a nightmare for maintenance as that one particular file is kept changing. It's a guarenteed way to look for trouble.

Expected Behavior

Please specify the expected behavior of your requested enhancement. Some great
and helpful pointers are your expected interface (e.g. command patterns,
simple sketches of the user interface, etc).

A directory-oriented way to provide PWA cache input instead of risking consolidations to 1 repository.

Current Behavior

Please specify the current behavior (e.g. workaround, blockage, etc).

Using consolidated 1 toml file for the entire repository.

Attachment

Please drag and drop the necessary data files (e.g. screenshot, logs, etc)
below.
hollowaykeanho commented 1 year ago

May have to revisit full directory recursive scan due to #30

hollowaykeanho commented 1 year ago

Scan all directories method not possible and it will revert back to Issue #26. Basically, we're stuck.

hollowaykeanho commented 1 year ago

Managed to develop a way to scan all pages only at root page while maintaining performance (commit: https://github.com/ZORALab/Hestia/commit/7a6003c5b09a8e6e06aa557c261a357590881979).

metric-stage-5.ods metric-stage-5.txt metric-stage-4.ods metric-stage-4.txt

Can leverage the scan loop to process all caching data.

hollowaykeanho commented 1 year ago

Fixed in 265f8651a9d39e2195e3445d70c2e38040443117. Updating all existing documents...

hollowaykeanho commented 1 year ago

All documentations updated.

hollowaykeanho commented 1 year ago

Released in https://github.com/ZORALab/Hestia/releases/tag/v1.0.0