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

Views are taking too much time to process when there are too many components and languages on the project #6269

Closed
dgarana opened this issue Jul 8, 2021 · 5 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@dgarana
Copy link

dgarana commented Jul 8, 2021

Describe the issue

When processing the show_project view, the request is taking too much time. This is not because of the rendering itself, this is because the ammount of data the context is requesting to generate before rendering the template.

We've identified that, although we are paginating the components inside a project, we are trying to retrieve all the languages stats for the whole project, which basically iterates over all the components for the specific project that we are requesting and then requests their languages and merges it's stats.

This process is taking too much time to compute (more than 30 minutes to process).

This is only happening, as I mentioned, when the project has too many components and those components are translated into too many different languages.

I already tried

Monkey patching the library in order to do not compute the information displayed on the "languages" tab in order to reduce the amount of operations executed against the database, and this has decreased the process down to 5 secs.

To Reproduce the issue

Create a Project with 15.000 components. Translate those components into different languages so the total languages for this project is more or less 120 (Components should be translated at least to 10 different languages).

After that, you'll see that when trying to process the show_project view, it will take more than 1 minute.

Expected behavior

The show_project view should be processed and rendered in a matter of seconds.

Server configuration and status

Tested on 4.6.1 and 4.7, both versions are facing the same issue.

@dgarana dgarana added the question This is more a question for the support than an issue. label Jul 8, 2021
@github-actions
Copy link

github-actions bot commented Jul 8, 2021

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@nijel nijel self-assigned this Jul 12, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Jul 23, 2021
@nijel nijel added bug Something is broken. and removed question This is more a question for the support than an issue. wontfix Nobody will work on this. labels Jul 23, 2021
@nijel nijel added this to the 4.8 milestone Jul 23, 2021
@nijel
Copy link
Member

nijel commented Aug 20, 2021

Most of this should be addressed in 9262194 - the component level stats were correctly updated, but the language level ones were not.

@nijel nijel modified the milestones: 4.8, 4.8.1 Aug 21, 2021
nijel added a commit that referenced this issue Aug 24, 2021
There is no need to fetch translation objects here.

Issue #6269
nijel added a commit that referenced this issue Aug 24, 2021
This utilizes shared component queryset.

Issue #6269
@nijel nijel modified the milestones: 4.8.1, 4.9 Sep 10, 2021
@nijel
Copy link
Member

nijel commented Nov 9, 2021

The additional performance improvements will be part of 4.9. For example, 0566fb8 and 68a566c should have a positive effect on your setup.

@nijel nijel closed this as completed Nov 9, 2021
@github-actions
Copy link

github-actions bot commented Nov 9, 2021

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken.
Projects
None yet
Development

No branches or pull requests

2 participants