Skip to content

Comments

Add FXLayer Performance Test#273

Merged
1brucben merged 1 commit intov0.3.0from
fxlayerperf
Feb 23, 2026
Merged

Add FXLayer Performance Test#273
1brucben merged 1 commit intov0.3.0from
fxlayerperf

Conversation

@1brucben
Copy link
Owner

This pull request introduces performance benchmarking tests for both the original FxLayer and the new FxLayerV2, and updates the game renderer to use FxLayerV2 instead of FxLayer. The main goal is to compare and validate the performance improvements brought by FxLayerV2 and ensure consistent rendering behavior in the game client.

Performance benchmarking and testing:

  • Added a new test suite FxLayerV2.perf.test.ts to compare the performance of FxLayer (V1) and FxLayerV2 across multiple scenarios, printing side-by-side results for analysis.
  • Introduced a baseline performance benchmark test for the original FxLayer in FxLayer.perf.test.ts using a factory harness for consistent measurement and comparison.

Renderer integration:

  • Updated the import in GameRenderer.ts to use FxLayerV2 (aliased as FxLayer) instead of the original FxLayer, ensuring the renderer utilizes the optimized implementation.

- Created FxLayer.perf.test.ts to benchmark the performance of the original FxLayer implementation.
- Created FxLayerV2.perf.test.ts to compare the performance of FxLayerV2 against the original FxLayer.
- Introduced fx-layer-bench-harness.ts to provide a reusable benchmarking harness for rendering layers with visual effects.
- Implemented various benchmark scenarios to evaluate performance under different conditions, including explosion effects and rendering efficiency.
@1brucben 1brucben self-assigned this Feb 23, 2026
@1brucben 1brucben added this to the v0.3.0 milestone Feb 23, 2026
@El-Magico777 El-Magico777 added enhancement New feature or request labels Feb 23, 2026
@1brucben 1brucben merged commit 0d82f2e into v0.3.0 Feb 23, 2026
7 checks passed
@El-Magico777 El-Magico777 changed the title Improve FXLayer Performance Add FXLayer Performance Test Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants