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

Added Cache Map (.basset) #27

Merged
merged 20 commits into from
Apr 26, 2023
Merged

Added Cache Map (.basset) #27

merged 20 commits into from
Apr 26, 2023

Conversation

promatik
Copy link
Contributor

This PR aims the first possible improvement on #18 👌

I'll start this by the results;

Previous loading times in ms for demo monsters edit page, >200 bassets;

5.3005218505859
4.9705505371094
5.4311752319336

Using cache map 🤯

1.5203952789307
1.662015914917
1.467227935791

It's 3 times faster!!!


There's a new config for enabling or disabling cacheMap 'cache_map' => true.
In order to test the loading times, there's a hidden config 'log_execution_time' => true 👌

Copy link
Member

@tabacitu tabacitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this! Let's do it! Left a few notes on class names etc - let me know what you think.

src/Helpers/Unarchiver.php Outdated Show resolved Hide resolved
src/Helpers/CacheMap.php Outdated Show resolved Hide resolved
src/Helpers/CacheMap.php Outdated Show resolved Hide resolved
src/Helpers/CacheMap.php Outdated Show resolved Hide resolved
src/Console/Commands/BassetClear.php Show resolved Hide resolved
src/BassetManager.php Outdated Show resolved Hide resolved
src/BassetManager.php Outdated Show resolved Hide resolved
@tabacitu
Copy link
Member

Also, heads-up @promatik - please merge main into this branch to resolve the merge conflicts.

@tabacitu tabacitu assigned promatik and unassigned tabacitu Apr 21, 2023
@promatik
Copy link
Contributor Author

  1. I end up fixing more stuff in the .basset file, since the url is now removed, I also removed the path system path on basset block files and it's now ordered 🧹

image

  1. Moved the .basset file inside the basset folder, it was in the root
    /storage/public/.basset » /storage/public/{$bassetPath = 'basset'}/.basset.

  2. All the variables have a types 🧹

  3. GitHub CI is fixed 😅

@tabacitu tabacitu merged commit 5d2edc5 into main Apr 26, 2023
@tabacitu tabacitu deleted the cache-map branch April 26, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants