InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

Performance improvement for notifications API endpoint

Open SchrodingersGat opened this issue 1 year ago • 3 comments

  • URL: http://localhost:8000/api/notifications/?format=json

Before

image

After

image

SchrodingersGat avatar May 03 '24 09:05 SchrodingersGat

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
Latest commit c31df311d19e45d593314ad510818e459fe73d6a
Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/664c879c36b80700085396f0

netlify[bot] avatar May 03 '24 09:05 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.06%. Comparing base (76b298c) to head (c31df31). Report is 311 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7154      +/-   ##
==========================================
+ Coverage   83.96%   84.06%   +0.10%     
==========================================
  Files        1057     1046      -11     
  Lines       46495    45834     -661     
  Branches     1360     1175     -185     
==========================================
- Hits        39040    38532     -508     
+ Misses       7102     7027      -75     
+ Partials      353      275      -78     
Flag Coverage Δ
backend 85.42% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 03 '24 10:05 codecov[bot]

Ah, this has potential but needs some more work. The actual serialized content varies a lot based on the "target" and "source" content types so the prefetch does not always work...

Might be a good idea to add a "link" field to the notification model so we can cache this data, and not have to do (expensive) lookup.

SchrodingersGat avatar May 03 '24 11:05 SchrodingersGat