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

chore: add caching for engines to improve load time #4481

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jan 17, 2025

Describe Your Changes

Currently, the app waits for the cortex.cpp server to load before displaying the current model and engines, which is not user-friendly.

This PR introduces a SWR storage cache provider to eliminate any delays users experience when opening the app, especially after engine persistence.

Changes

This pull request includes several important changes to the web/containers directory, focusing on improving the caching mechanism and simplifying the codebase. The most significant changes include the addition of a new SWRConfigProvider component, updates to the Providers component to use the new provider, and a minor simplification in the TableActiveModel component.

Improvements to caching mechanism:

Codebase simplification:

Additional imports:

@louis-jan louis-jan changed the base branch from dev to main January 17, 2025 16:14
@louis-jan louis-jan requested a review from urmauur January 17, 2025 16:15
@louis-jan louis-jan changed the title Chore/engines data cache chore: engines data cache Jan 17, 2025
@louis-jan louis-jan changed the title chore: engines data cache chore: add caching for engines to improve load time Jan 17, 2025
Copy link
Contributor

github-actions bot commented Jan 17, 2025

Barecheck - Code coverage report

Total: 67.98%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
web/containers/Layout/BottomPanel/SystemMonitor/TableActiveModel/index.tsx51-53
web/containers/ModelDropdown/index.tsx126-127, 137, 146, 150, 152, 154-155, 157-158, 160-163, 165, 187-188, 198, 202, 217-218, 225-228, 230, 232, 251, 256, 266, 273, 276-277, 298, 322, 345, 366, 375, 381, 389, 392, 394, 398, 400-405, 408, 411, 468-469, 471, 497, 505, 507, 532, 537-538, 540, 544-546, 548-549, 551, 561-564, 595, 603, 605

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@louis-jan louis-jan merged commit 0dd2519 into main Jan 18, 2025
9 checks passed
@louis-jan louis-jan deleted the chore/engines-data-cache branch January 18, 2025 02:31
@github-actions github-actions bot added this to the v0.5.16 milestone Jan 18, 2025
@imtuyethan imtuyethan modified the milestones: v0.5.16, v0.5.15 Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants