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

Feature: improve concept show children call to be twice faster #921

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

syphax-bouazzouni
Copy link
Collaborator

@syphax-bouazzouni syphax-bouazzouni commented Jan 27, 2025

Require

Context

before 7 API calls, total 7136ms

Processing by ConceptsController#index as HTML
  Parameters: {"conceptid"=>"http://aims.fao.org/aos/agrovoc/c_330834", "concept_schemes"=>"", "language"=>"EN", "ontology"=>"AGROVOC"}
* Locale set to 'en'
Getting: https://data.stageportal.lirmm.fr with {} (t: 0.2040101170005073s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/slices with {:display_links=>false, :display_context=>false} (t: 2.345375471999432s - cache: miss)
Getting: https://data.stageportal.lirmm.fr with {} (t: 0.22914239899910172s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/ontologies/AGROVOC with {:include_views=>true} (t: 0.1970192330009013s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/ontologies/AGROVOC/latest_submission with {:include=>"uriRegexPattern,preferredNamespaceUri"} (t: 0.34039248199951544s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/ontologies/AGROVOC/classes/http%3A%2F%2Faims.fao.org%2Faos%2Fagrovoc%2Fc_330834 with {:dispay=>"prefLabel", :include=>"prefLabel,definition,synonym,obsolete,hasChildren,inScheme,memberOf"} (t: 0.3808957980018022s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/ontologies/AGROVOC/classes/http%3A%2F%2Faims.fao.org%2Faos%2Fagrovoc%2Fc_330834/children with {:pagesize=>750, :language=>"EN", :display=>"prefLabel,obsolete,hasChildren", :include=>"prefLabel,definition,synonym,obsolete,hasChildren,inScheme,memberOf"} (t: 2.8401889389988355s - cache: miss)
Completed 200 OK in 7136ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 394551)

after 3 API calls, total 3975ms

Processing by ConceptsController#index as HTML
  Parameters: {"conceptid"=>"http://aims.fao.org/aos/agrovoc/c_330834", "concept_schemes"=>"", "language"=>"EN", "ontology"=>"AGROVOC"}
* Locale set to 'en'
Getting: https://data.stageportal.lirmm.fr/slices with {:display_links=>false, :display_context=>false} (t: 0.37758208299055696s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/ontologies/AGROVOC/latest_submission with {:include=>"uriRegexPattern,preferredNamespaceUri"} (t: 0.451797458998044s - cache: miss)
Getting: https://data.stageportal.lirmm.fr/ontologies/AGROVOC/classes/http%3A%2F%2Faims.fao.org%2Faos%2Fagrovoc%2Fc_330834/children with {:pagesize=>750, :language=>"EN", :display=>"prefLabel,obsolete,hasChildren"} (t: 2.3704248760041082s - cache: miss)
Completed 200 OK in 3623ms (Views: 0.1ms | ActiveRecord: 0.0ms | Allocations: 301040)

@syphax-bouazzouni syphax-bouazzouni force-pushed the feature/optomize-show-children-call branch from df4b08d to 944a498 Compare January 27, 2025 13:34
@syphax-bouazzouni syphax-bouazzouni force-pushed the feature/optomize-show-children-call branch from 944a498 to 1fbb954 Compare January 27, 2025 14:02
@syphax-bouazzouni syphax-bouazzouni changed the title Feature: improve concept show children call Feature: improve concept show children call to be twice faster Jan 31, 2025
@syphax-bouazzouni syphax-bouazzouni marked this pull request as ready for review January 31, 2025 18:19
@syphax-bouazzouni syphax-bouazzouni self-assigned this Jan 31, 2025
@syphax-bouazzouni syphax-bouazzouni added the enhancement New feature or request label Jan 31, 2025
@Bilelkihal
Copy link
Collaborator

@syphax-bouazzouni
I couldn't run locally cause bundler 2.5.22 is required somewhere ! (we can't use this version of bundler before going with ruby 3)
do you know what could be the potential reason for this?
image

@syphax-bouazzouni
Copy link
Collaborator Author

@syphax-bouazzouni I couldn't run locally cause bundler 2.5.22 is required somewhere ! (we can't use this version of bundler before going with ruby 3) do you know what could be the potential reason for this? image

You can do bundle update locally in your machine, to use ruby 2.7.8, in my case I had ruby 3.

@Bilelkihal
Copy link
Collaborator

Bilelkihal commented Feb 4, 2025

I got this error when I tried to run it on docker, and doing bundle update also gives the same error,
and doing bundle update locally didn't work for me with another error.
can you do bundle update from your side and push the gem.lock file since the tests are not working

@syphax-bouazzouni
Copy link
Collaborator Author

I got this error when I tried to run it on docker, and doing bundle update also gives the same error, and doing bundle update locally didn't work for me with another error. can you do bundle update from your side and push the gem.lock file since the tests are not working

Done

@syphax-bouazzouni
Copy link
Collaborator Author

I got this error when I tried to run it on docker, and doing bundle update also gives the same error, and doing bundle update locally didn't work for me with another error. can you do bundle update from your side and push the gem.lock file since the tests are not working

Done

Not done

@syphax-bouazzouni syphax-bouazzouni force-pushed the feature/optomize-show-children-call branch 2 times, most recently from d13910c to a085514 Compare February 4, 2025 14:26
@syphax-bouazzouni syphax-bouazzouni force-pushed the feature/optomize-show-children-call branch from a085514 to 2ae7434 Compare February 4, 2025 14:30
@syphax-bouazzouni
Copy link
Collaborator Author

@Bilelkihal done

Copy link
Collaborator

@Bilelkihal Bilelkihal left a comment

Choose a reason for hiding this comment

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

Good work 👏

@Bilelkihal Bilelkihal merged commit 1e611e5 into development Feb 4, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants