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

Poor performance when XBlock class is not found #811

Open
ormsbee opened this issue Jan 18, 2025 · 1 comment
Open

Poor performance when XBlock class is not found #811

ormsbee opened this issue Jan 18, 2025 · 1 comment
Labels
performance Relates to improving latency/throughput or reducing resource usage

Comments

@ormsbee
Copy link
Contributor

ormsbee commented Jan 18, 2025

Checking the entrypoints for the XBlock class we want for a given tag name is relatively expensive. We mitigate this by caching all the XBlock classes when we load them. But we don't cache when we fail to find an XBlock class. So if a course has many instances of a type of XBlock that is not installed on the given instance, we're constantly scanning entrypoints. This really slows down things like the Studio course outline page.

The fix is to cache the fact that there is no matching XBlock class for this tag.

@ormsbee ormsbee added the performance Relates to improving latency/throughput or reducing resource usage label Jan 18, 2025
@ormsbee
Copy link
Contributor Author

ormsbee commented Jan 18, 2025

On one of our sandbox instances, this accounts for ~85% of a five second load time for the Studio course index page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Relates to improving latency/throughput or reducing resource usage
Projects
None yet
Development

No branches or pull requests

1 participant