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

[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 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