gajus / gajus/slonik-interceptor-query-normalisation

Performance issue: stripComments blocks event loop for 12s

Open
#1 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
2
PR merge metrics
No merged PRs in 30d

Description

We did a CPU profiling for our node app and noticed that the query normalization blocks event loop for quite a while:

146690398-ff776b3e-9cde-4521-8a2c-14999431c8b2

[stripComments](https://github.com/gajus/slonik-interceptor-query-normalisation/blob/master/src/utilities/stripComments.js) function was taking 12 seconds in one long SQL query we were using.

Wanted to report this for others possibly investigating the same, feel free to close. Unfortunately I don't have a reproducible query example.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/utilities/stripComments.js and the CPU profile described in the issue. Investigate the reported event-loop blocking using a long SQL query, but note that the issue provides no reproducible query or specific requested change. Completion criteria are not defined beyond addressing the reported 12-second delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, postgresql
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
22/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.