You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(actions): pre-normalize Command Palette fields and eliminate repeated lowercasing in schema search #1528
In QueryaCommand.matches (lib/core/actions/querya_command.dart), for every registered command on every keystroke in the Command Palette, id.split('.').last.toLowerCase(), fields = <String>[...], and q.split(RegExp(r'\s+')) are executed. For 150 commands, this creates 150 regex compilations and hundreds of temporary lists and strings.
In filterSchemaObjects (lib/core/actions/querya_schema_object.dart), for every keystroke, object.searchHaystack.toLowerCase() is called for all 5,000+ schema objects in memory, generating 5,000 heap strings per character typed.
Solution
Pre-normalize search haystacks to lowercase once when creating or registering QueryaCommand and QueryaSchemaObject.
Split query once before the loop rather than repeating inside every command's match check.
Replace id.split('.').last with index scanning from the end (lastIndexOf('.')).
Benefits
0 lowercasing allocations inside the search loop (saving 5,000+ string allocations per keystroke).
Smooth 60/120 FPS filtering in Quick Open and Command Palette.
Activity