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

feat: Improve triggers query performances #2256

Merged
merged 1 commit into from
Dec 16, 2024
Merged

feat: Improve triggers query performances #2256

merged 1 commit into from
Dec 16, 2024

Conversation

paultranvan
Copy link
Contributor

@paultranvan paultranvan commented Dec 10, 2024

We used to query all triggers, in order to determine which konnectors accounts are connected, to adapt display on the homepage.

However, this query can be very time-consuming: it takes ~10s on an instance with 700+ triggers and ~2.2s on an instance with 150 triggers. This is due to the stack computing job information from each trigger.
As we do not need such information here, we force the generic /data route, rather than the specialized /jobs/triggers route.
With 150 triggers, we improve query time from ~2200ms to ~50ms.

### ✨ Features

* Improve triggers retrieval

### 🐛 Bug Fixes

*

### 🔧 Tech

*

Copy link

bundlemon bot commented Dec 10, 2024

BundleMon

Files updated (7)
Status Path Size Limits
app/home.(hash).js
56.19KB (+32B +0.06%) -
intents/home.(hash).js
26.62KB (+30B +0.11%) -
services/myselfFromIdenties/home.js
236.28KB (+28B +0.01%) -
services/deleteAccounts/home.js
311.88KB (+23B +0.01%) -
services/updateAccounts/home.js
463.22KB (+20B 0%) -
services/softDeleteOrRestoreAccounts/home.js
466.08KB (+17B 0%) -
vendors/home.(hash).js
1.57MB (-577B -0.04%) -
Unchanged files (6)
Status Path Size Limits
services/polyfillFetch/home.js
97.38KB -
vendors-home.(hash).(hash).min.css
37.78KB -
services/attributesHelpers/home.js
15.22KB -
app-home.(hash).min.css
2.21KB -
intents/index.html
651B -
intents-home.(hash).min.css
158B -

Total files change -429B -0.01%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

We used to query all triggers, in order to determine which konnectors
accounts are connected, to adapt display on the homepage.

However, this query can be very time-consuming: it takes ~10s on an
instance with 700+ triggers. This is due to the stack computing job
information from each trigger.
As we do not need such information here, we force the generic `/data`
route, rather than the specialized `/jobs/triggers` route.
@paultranvan paultranvan marked this pull request as ready for review December 11, 2024 13:10
@zatteo
Copy link
Contributor

zatteo commented Dec 16, 2024

Huge!

@paultranvan paultranvan merged commit 228127a into master Dec 16, 2024
4 checks passed
@paultranvan paultranvan deleted the query-jobs branch December 16, 2024 09:57
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