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

fix: LSDV-5425-1: Fix possible performance regression introduced in #4588 #4623

Merged

Conversation

jombooth
Copy link
Contributor

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

(link to issue, supportive screenshots etc.)

per discussion with @makseq, remove the new use of QuerySet#first() from #4588 in favor of fast_first. Also reimplement fast_first not to cache the entire queryset, but use a LIMIT 1 query.

What does this fix?

(if this is a bug fix)

What is the new behavior?

(if this is a breaking or feature change)

What is the current behavior?

(if this is a breaking or feature change)

What libraries were added/updated?

(list all with version changes)

Does this change affect performance?

(if so describe the impacts positive or negative)

Does this change affect security?

(if so describe the impacts positive or negative)

What alternative approaches were there?

(briefly list any if applicable)

What feature flags were used to cover this change?

(briefly list any if applicable)

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)

@jombooth jombooth requested a review from makseq August 11, 2023 00:53
@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit bcd8147
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/64d6909b54e36100089338ae

@netlify
Copy link

netlify bot commented Aug 11, 2023

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit bcd8147
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/64d6909bfe58b30008ec80a2

@github-actions github-actions bot added the fix label Aug 11, 2023
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.03% 🎉

Comparison is base (6523f96) 75.73% compared to head (bcd8147) 75.77%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4623      +/-   ##
===========================================
+ Coverage    75.73%   75.77%   +0.03%     
===========================================
  Files          157      157              
  Lines        12459    12458       -1     
===========================================
+ Hits          9436     9440       +4     
+ Misses        3023     3018       -5     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jombooth jombooth marked this pull request as ready for review August 14, 2023 16:01
@jombooth jombooth merged commit b6b1705 into develop Aug 14, 2023
60 checks passed
@jombooth jombooth deleted the fb-LSDV-5425-1/task-and-annotation-permissions-perf-followup branch August 14, 2023 18:18
shayantabatabaee pushed a commit to shayantabatabaee/label-studio that referenced this pull request Sep 19, 2023
…umanSignal#4588 (HumanSignal#4623)

* fix: LSDV-5425-1: Fix possible performance regression introduced in HumanSignal#4588

* remove unnecessary None setting

* make just one query in fast_first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants