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

ETQ instructeur, la page de mes démarches est un peu plus rapide #9543

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

colinux
Copy link
Member

@colinux colinux commented Sep 29, 2023

Suite de #9517 qui chargeait la home en 20-30s

  • limite les jointures sur dossiers, tout en ne récupérant que l'info qui nous intéresse (la procedure_id via la révision)
  • ne préload pas du contenu inutile , en particulier tous les dossiers de chaque procédure

J'en ai profité pour créér une tache rake qui permet de benchmarker des actions :

Instructeurs::ProceduresController#index
                          9.725  (±10.3%) i/s -     48.000  in   5.061325s
Instructeurs::ProceduresController#index_slow
                          0.459  (± 0.0%) i/s -      3.000  in   6.622812s

Comparison:
Instructeurs::ProceduresController#index:              9.7 i/s
Instructeurs::ProceduresController#index_slow:         0.5 i/s - 21.19x  slower

On reste à peu près iso par rapport à la prod actuelle (tag@2023-09-27-01) :

Instructeurs::ProceduresController#index
                          9.841  (±20.3%) i/s -    284.000  in  30.012959s
Instructeurs::ProceduresController#index_prod
                         11.065  (± 9.0%) i/s -    329.000  in  30.022673s

Comparison:
Instructeurs::ProceduresController#index_prod:       11.1 i/s
Instructeurs::ProceduresController#index:            9.8 i/s - same-ish: difference falls within error

@colinux colinux force-pushed the fix-perf-instructeurs-home branch from 139d6d3 to 8678986 Compare September 29, 2023 13:11
@tchak tchak added this pull request to the merge queue Sep 29, 2023
Merged via the queue into demarches-simplifiees:main with commit 619e545 Sep 29, 2023
15 checks passed
@colinux colinux deleted the fix-perf-instructeurs-home branch October 2, 2023 07:55
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