-
Notifications
You must be signed in to change notification settings - Fork 4
Open
1 / 11 of 1 issue completedLabels
bugSomething isn't workingSomething isn't workingchallengechallenging taskchallenging taskenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededuser interface
Description
Description:
With the current filter implementation, if the log viewer has large numbers of logs (for example, 100K entries), each filter change freezes the window for some tens of seconds (on app. 150:K entries, a simple filtering by log priority was freezing UI for approximately 40 secs.). This performance must be improved by following way:
- Keep current model structure:
- LoggingModelBase — source, holding all logs.
- LogViewerFilter — proxy on top of it.
- Make LogViewerFilter lightweight:
- Override filterAcceptRow() to only check against a precomputed bitset or list indicating which rows are accepted, not doing filtering work inline.
- This bitset/list is computed in the background thread asynchronously. Example of bit-sets
QArray<bool> bitsets;-- this keeps only boolean values to indicate whether row is accepted or not when callfilterAcceptRow().
- Background filter worker:
- When filter criteria change:
- Post the filter criteria + current snapshot of logs to the background thread.
- Background thread filters logs chunk-by-chunk, builds a bitset or vector of accepted row indices.
- Support cancellation if new filter criteria arrive before finishing.
- Update proxy model incrementally:
- When the worker thread completes filtering (or partial chunk), it emits a signal with updated filtered row info.
- The proxy model updates the internal acceptance bitset and calls beginResetModel() / endResetModel() or uses more fine-grained row insertions/removals if possible.
- This allows Qt view to repaint with new filtered data without blocking UI.
- Optimize data() calls:
- Cache or precompute string representations where possible, e.g., keep thread IDs or priorities as integers and only convert to string when displaying (not in filtering).
- For filtering on numeric IDs, compare IDs directly, not strings.
- Implement efficient lazy string conversion, possibly store QString for common fields on log insert.
- Handle live data during filtering:
- The background filter thread processes a snapshot of logs at the filter start.
- New logs arriving are appended to LiveLogsModel and stored, but filtering is only applied to them after the current filtering pass completes.
- You may queue new filtering jobs for newly arrived logs or batch updates.
Sub-issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingchallengechallenging taskchallenging taskenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is neededuser interface
Projects
Status
No status