this slightly improves lookup time for each cached entry (etag and last-modified)
by setting both entries next to each other, meaning when the one is found, the other
is already loaded in memory.
- add etag support
- add last-modified support
with the above 2 changes, this means that all downloads can be cached. when attempting to download a file,
if the file is an image, load from cache. after, the download is processed with the above tags sent. if a 304 code
is received, then the file hasn't changed. otherwise, the new tags are saved and the downloaded file is now used (in the
case of an image, the new image is now loaded over the cached one).
this results in a *huge* speed improvement and overall a huge amount of bandwidth is saved for both the client and server.
- themezer requests now only request the data needed.
this results in a json file that is 4-5x smaller, meaning a much faster download and parsing time.
- loading images is capped to 2 images a frame. this was done to avoid fs being the bottle neck.
a 9 page listing will take 5 frames. scrolling through lists is more responsive.
- downloads are pushed to the front of the queue as they're added. the point of this is to prioritise
data that we need now.
- fix potential crash when sorting files based on names as its possible for a file to have the same name
in the metadata. this fallsback to sorting by path, which is unique.
- add timeout for processing events. this was done in order to not block the main thread for too long.
- github json files have changed from a name + url to a repo + author pair.
- drawing widgets now starts from the last file in the array. as a menu takes up the whole screen, it
is pointless drawing menu's underneath. this halves gpu usage.
- download url caching has been removed. this was added to fix a race condition when opening /
closing a widget which starts a download when created. this would result in 2 same files being
downloaded at the same time. this is no longer an issue and was overhead per download request.
* Fix starred homebrew list logging, fix hbmenu identification when backing up it and logging it correctly, update french language.
Signed-off-by: shadow2560 <24191064+shadow2560@users.noreply.github.com>
Replaced some lower case chars to match English style.
Replaced some words like Homebrew, AppStore, IRS, etc… that doesn’t have direct meaning in Spanish, literal translation sound awkward so it’s better leave them in English.
Filled out missing translations.
the issue isn't with the pr itself, however it did expose the lack of caching with the translation strings, it will
continue to search for strings, even if we already found them.
to solve this, i used a map to cache said strings