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

load all tags before questions #282

Merged
merged 1 commit into from
Jul 23, 2023
Merged

load all tags before questions #282

merged 1 commit into from
Jul 23, 2023

Conversation

mruwnik
Copy link
Collaborator

@mruwnik mruwnik commented Jul 18, 2023

No description provided.

@@ -22,6 +22,7 @@ import {reloadInBackgroundIfNeeded} from '~/server-utils/kv-cache'

export const loader = async ({request}: Parameters<LoaderFunction>[0]) => {
try {
await loadTags(request)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

double the initial loading time :/
The problem here is that questions don't download the metadata of their tags, only the name. So the questions need to fetch tags before being able to filter out internal ones. This adds an initial tax, rather than per request, so potentially better?

Copy link
Collaborator

Choose a reason for hiding this comment

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

did you check /questions/cache on localhost that it's cached, please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is

@mruwnik mruwnik requested a review from Aprillion July 18, 2023 17:00
@mruwnik mruwnik merged commit 1bc5b68 into master Jul 23, 2023
@mruwnik mruwnik deleted the hide-internal-tags branch July 23, 2023 11:19
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.

2 participants