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

Feeds generate n+1 queries for related image content #47

Open
ckinsey opened this issue Apr 8, 2019 · 1 comment
Open

Feeds generate n+1 queries for related image content #47

ckinsey opened this issue Apr 8, 2019 · 1 comment

Comments

@ckinsey
Copy link

ckinsey commented Apr 8, 2019

  • Django Wagtail Feeds version: 0.1.0
  • Python version: 3.6.5
  • Operating System: Mac OSX 10.14

Description

Extended feeds executen+1 queries to gather image content from StreamFields.

What I Did

Here's a traced transaction from our APM tool:

Screen_Shot_2019-04-08_at_3_34_19_PM

I'm not sure what tools Wagtail provides for prefetching associated images from RichTextBlocks in StreamFields, but for large feeds this can generate 100s or 1000s of database queries to render a single feed.

Happy to spend some time on this and see if I can find a fix, but wanted to make sure I wasn't missing some easily configurable thing like subclassing the feed object overriding a queryset or something.

@chrisdev
Copy link
Owner

chrisdev commented Apr 9, 2019

@ckinsey I think I'm the one that missed the performance hit! It was quick and dirty implementation that I had intended to get back too but I just did not have the time. We'll be grateful if you could take a look

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

No branches or pull requests

2 participants