Repository navigation
refactor: major architecture overhaul and performance improvements
This MR introduces a layered architecture and several critical
optimizations to the pathfinders visualizer.
Architecture changes:
• Split codebase into 5 layers: domain, algorithms, config,
presentation, state
• Move rendering logic from App to dedicated Renderer struct
• Extract UI colors and constants to config/constants.rs
• Remove cyclic dependencies between modules
Performance optimizations:
• Replace Vec<Vec> with flat Vec (cache locality)
• Reduce mutex locks in BFS from 3-4 per neighbor to 1 per batch
• Move state.wait() outside lock blocks for smooth 60 FPS UI
• Remove unused CellCoordinates field (saves 4 bytes per cell)
Bug fixes:
• Fix BFS early-exit logic (path found when neighbor is end)
• Prevent deadlocks by releasing locks before path reconstruction
• Fix mouse click zone mismatch in menu buttons
• Handle unreachable states in CarFSM (from previous work)
Features added:
• TOML-based configuration with graceful fallback
• VisualState::Chosen highlighting for current algorithm cell
• Structured logging via log/env_logger crates
• Comprehensive README with features, structure and roadmap
Breaking changes:
• Settings struct replaced with AppConfig
• Arc<Mutex> removed from AppMenu (single owner pattern)
What's Changed
- [feature/refactoring]: refactor: restructure architecture, optimize grid/mutexes, add TOML config ... by @killpop3770 in #1
- [feature/refactoring]: update version by @killpop3770 in #2
New Contributors
- @killpop3770 made their first contribution in #1
Full Changelog: v0.2.0-alpha...v1.0.0