Skip to content

feat(perf): Phase 1 Performance Optimizations - #14

Merged
Vladush merged 2 commits into
masterfrom
feat/performance-phase-1
Jan 10, 2026
Merged

Vladush merged 2 commits into
masterfrom
feat/performance-phase-1

Conversation

@Vladush

@Vladush Vladush commented Jan 9, 2026

Copy link
Copy Markdown
Owner

Description

Implemented Phase 1 of performance and security optimizations:

  1. Replaced std::regex: Switched username validation to a manual character loop (Fixes CodeQL ReDoS warning, strictly blocks path traversal).
  2. GPU Throttle: Changed default gpu_throttle_ms to 20ms to prevent UI hangs.
  3. Model Pre-loading: Models now load in AuthEngine::init() (service startup), eliminating first-login latency.

Type of change

  • Bug fix (ReDoS, Path Traversal)
  • New feature (Performance tuning: pre-loading, throttling)
  • Breaking change
  • Documentation update

How Has This Been Tested?

  • linuxcampam_tests: Passed 30/30 tests (including new strict validation logic).
  • Manual Verification: Verified config defaults and logs.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Vladush
Vladush merged commit 7198965 into master Jan 10, 2026
8 checks passed
@Vladush
Vladush deleted the feat/performance-phase-1 branch January 10, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant