Commit Graph
18 Commits
Author SHA1 Message Date
Tunglies e4abdb8c0d perf(ui): remove per-second allocations in traffic, log and proxy render paths (#8689)
* perf(home): draw the traffic graph from refs instead of per-snapshot state

Worker snapshots re-rendered the whole graph tree per update and the
sampler sliced its full buffer every second just to compare for
equality. Snapshots now feed display data and the y-scale through refs
(React state only tracks the diagnostics badge inputs, skipped while
hidden), the draw callback chain is identity-stable, per-draw axis
ticks/labels and gradient strings go through pooled buffers and bounded
caches, and the sampler version counter plus an oldest-point age check
let the idle poll skip unchanged slices.

* perf(ui): hoist static icons and style identities in traffic widgets

Stat-card icons were rebuilt per parsed-data update, defeating the
memoized card comparison, and the layout traffic widget reallocated its
style objects (with a redundant double sx spread) on every tick.

* perf(log): compile the highlight regex once per search state

Each visible row recompiled (and re-escaped) the same regex three times
per render while logs stream in; the compiled regex is now cached per
search state identity.

* perf(proxy): reuse the parsed scroll-position snapshot and drop per-frame copies

The sticky-index lookup copied and reversed its array per range
extraction and every throttled save re-read and re-parsed the same
localStorage payload; the reverse scan is now allocation-free and the
parse goes through one read-through snapshot.

* test(perf): add proxy scroll scene to the perf adapter

Adds a proxy page scenario to the measurement adapter: a core-module
shim serves synthetic proxy/clash/run-state data at the invoke seam
(active only for the proxy scenario; other scenarios stay
byte-identical), and a sawtooth scroll driver keeps the virtualizer
measuring and the throttled scroll-position save running. Running the
scene additionally requires the harness-side scenario contract and
schema v10 from the clash-verge-rev-harness repository.

* chore(changelog): drop the hot-path refresh entries

* test(perf): move the proxy adapter scene to a separate change
2026-11-23 07:45:22 +00:00
Slinetrac c672a6fef3 refactor: lint (#6511)
* refactor: lint

* chore: remove eslint-plugin/config-prettier
2026-03-15 07:40:11 +00:00
Slinetrac a981be80ef refactor(base): expand barrel exports and standardize imports 2026-01-06 15:02:10 +08:00
Slinetrac 5d114806f7 refactor: layout and log components 2025-10-14 22:13:14 +08:00
Tunglies 627119bb22 Refactor imports and improve code organization across multiple components and hooks
- Consolidated and reordered imports in various files for better readability and maintainability.
- Removed unused imports and ensured consistent import styles.
- Enhanced the structure of components by grouping related imports together.
- Updated the layout and organization of hooks to streamline functionality.
- Improved the overall code quality by following best practices in import management.
2025-09-18 23:34:38 +08:00
Tunglies 319c5b84fa Revert "feat: enhance log filtering by adding support for debug level and updating log hierarchy #4293"
This reverts commit a9cfb2cfaa.
2025-08-08 15:17:46 +08:00
Tunglies a9cfb2cfaa feat: enhance log filtering by adding support for debug level and updating log hierarchy #4293 2025-08-06 20:49:54 +08:00
wonfen 48d68f5766 refactor: Simplify log data management and improve search functionality 2025-02-19 13:06:15 +08:00
huzibaca dca25637c9 feat: add logger highlighting, support regular and case matching 2024-11-19 04:10:10 +08:00
huzibaca a7020fd46c feat: add logger highlighting 2024-11-19 03:29:44 +08:00
dongchengjie 16b11fee31 chore: text overflow word-wrap & cleanup 2024-05-20 12:38:41 +08:00
GyDi 554d73c6ee fix: font family not works in some interfaces, close #639 2023-06-29 14:21:14 +08:00
GyDi 955c5b5605 fix: adjust log ui 2022-12-14 15:49:05 +08:00
GyDi 3a77c6f7eb fix: adjust item ui 2022-11-23 15:29:42 +08:00
GyDi 5fb1afc681 chore: adjust type 2022-11-19 17:22:29 +08:00
GyDi 786ea17f95 refactor: ts path alias 2022-08-06 02:35:11 +08:00
GyDi 206e613ace chore: adjust style 2022-03-23 13:58:57 +08:00
GyDi aeece6c201 chore: adjust files 2022-02-13 19:27:24 +08:00