assets/js/ticket.js (updatePreview, wired via textarea.addEventListener('input', updatePreview), ~lines 340,346-361) calls parseMarkdown() synchronously on every keystroke with no debounce/throttle. parseMarkdown() is a chain of ~15+ sequential regex .replace() passes over the full text, so on a long comment this re-runs the entire regex chain on every character typed.
Likely fine for typical comment lengths, but there's no debounce present at all, unlike the shared lt.typeahead/lt.combobox modules elsewhere in the same codebase, which do debounce (150ms). Not confirmed as user-visible lag today, just an inconsistency worth flagging since a slow client + a long comment could make typing feel laggy.
Fix: Add a small debounce (e.g. 100-150ms) to updatePreview's input handler, matching the pattern already used by the typeahead modules.
**Severity:** Low
`assets/js/ticket.js` (`updatePreview`, wired via `textarea.addEventListener('input', updatePreview)`, ~lines 340,346-361) calls `parseMarkdown()` synchronously on every keystroke with no debounce/throttle. `parseMarkdown()` is a chain of ~15+ sequential regex `.replace()` passes over the full text, so on a long comment this re-runs the entire regex chain on every character typed.
Likely fine for typical comment lengths, but there's no debounce present at all, unlike the shared `lt.typeahead`/`lt.combobox` modules elsewhere in the same codebase, which do debounce (150ms). Not confirmed as user-visible lag today, just an inconsistency worth flagging since a slow client + a long comment could make typing feel laggy.
**Fix:** Add a small debounce (e.g. 100-150ms) to `updatePreview`'s input handler, matching the pattern already used by the typeahead modules.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Low
assets/js/ticket.js(updatePreview, wired viatextarea.addEventListener('input', updatePreview), ~lines 340,346-361) callsparseMarkdown()synchronously on every keystroke with no debounce/throttle.parseMarkdown()is a chain of ~15+ sequential regex.replace()passes over the full text, so on a long comment this re-runs the entire regex chain on every character typed.Likely fine for typical comment lengths, but there's no debounce present at all, unlike the shared
lt.typeahead/lt.comboboxmodules elsewhere in the same codebase, which do debounce (150ms). Not confirmed as user-visible lag today, just an inconsistency worth flagging since a slow client + a long comment could make typing feel laggy.Fix: Add a small debounce (e.g. 100-150ms) to
updatePreview's input handler, matching the pattern already used by the typeahead modules.