Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

[WIP] Reduce number of queries when loading home page #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tonio
Copy link
Contributor

@tonio tonio commented Aug 1, 2014

What still needs to be done:

  • Fix broken tests (problem loading translations in fixtures)
  • Check performances on larger data set

priority = priorities[project.priority]
project = DBSession.query(Project).\
options(joinedload(Project.translations[request.locale_name])).\
filter(Project.id == project.id).first()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

.get(project.id) isn’t used here cause it causes to be loaded from the Session and not from database, ending in translations not loaded.

@pgiraud
Copy link
Collaborator

pgiraud commented Aug 5, 2014

It's broken for now :

  • searching for a word gives wrong results,
  • searching for "your projects" is super slow and doesn't give good results.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants