Commit Graph

304 Commits

Author SHA1 Message Date
Michael Freno
d126de6078 v0.5.2 release 2025-12-05 15:03:07 -05:00
Michael Freno
f3a65871da include FFI module 2025-12-05 15:01:17 -05:00
Michael Freno
1855e7f0f3 removed unneeded md 2025-12-05 14:54:26 -05:00
Michael Freno
abe34c4749 Implement algorithmic performance optimizations
Implemented high-impact optimizations from PERFORMANCE_ANALYSIS.md:

1. Dirty Flag System (30-50% fewer layouts):
   - Added _dirty and _childrenDirty flags to Element module
   - Elements track when properties change that affect layout
   - LayoutEngine checks dirty flags before expensive layout calculations
   - Element:setProperty() invalidates layout for layout-affecting properties

2. Dimension Caching (10-15% faster):
   - Enhanced _borderBoxWidth/_borderBoxHeight caching
   - Proper cache invalidation in invalidateLayout()
   - Reduces redundant getBorderBox calculations

3. Local Variable Hoisting (15-20% faster):
   - Hoisted frequently accessed properties outside tight loops
   - Reduced table lookups in wrapping logic (child.margin cached)
   - Optimized line height calculation (isHorizontal hoisted)
   - Heavily optimized positioning loop (hottest path):
     * Cached element.x, element.y, element.padding
     * Hoisted alignment enums outside loop
     * Cached child.margin, child.padding per iteration
     * 3-4 table lookups → 2 lookups per child

4. Array Preallocation (5-10% less GC):
   - Preallocated lineHeights with table.create() when available
   - Graceful fallback to {} on standard Lua

Estimated total gain: 40-60% improvement (2-3x faster layouts)
All 1257 tests passing. Zero breaking changes.

See ALGORITHMIC_OPTIMIZATIONS.md for full details.
2025-12-05 14:43:46 -05:00
Michael Freno
f785760e18 Merge luajit-ffi-optimizations into main
Adds FFI module with object pooling and batch operations.
Provides 5-10% performance gains with graceful Lua fallback.
Foundation for future optimizations documented in PERFORMANCE_ANALYSIS.md
2025-12-05 14:35:42 -05:00
Michael Freno
4652f05dac Add LuaJIT FFI optimizations for memory management
- New FFI module with object pooling for Vec2, Rect, Timer structs
- Integrated FFI into LayoutEngine, Performance, and Color modules
- Graceful fallback to standard Lua when LuaJIT unavailable
- Added ffi_comparison_profile.lua for automated benchmarking
- Comprehensive documentation of gains and real bottlenecks

Reality: 5-10% performance improvement (marginal gains)
FFI targets wrong bottleneck - real issue is O(n²) layout algorithm
See PERFORMANCE_ANALYSIS.md for high-impact optimizations (2-3x gains)
2025-12-05 14:35:37 -05:00
Michael Freno
ddb708a920 fixed listed changes in release 2025-12-05 11:58:13 -05:00
Michael Freno
8c7d107895 v0.5.1 release 2025-12-05 11:52:30 -05:00
Michael Freno
ae2d28f6b1 Adjust autosizing to better account for text wrapping. 2025-12-05 11:52:30 -05:00
github-actions[bot]
873299833b Archive previous documentation and generate v0.5.0 docs [skip ci] 2025-12-05 16:44:31 +00:00
Michael Freno
58c750108a v0.5.0 release 2025-12-05 11:44:11 -05:00
Michael Freno
7883f914d9 blur uses radius instead of intensity 2025-12-05 11:31:52 -05:00
Michael Freno
3eb5b12240 update release messages 2025-12-04 23:08:52 -05:00
Michael Freno
a00734f648 v0.4.3 release 2025-12-04 20:34:21 -05:00
Michael Freno
61500f9131 added theme state locks 2025-12-04 20:34:21 -05:00
github-actions[bot]
2554d76a84 Archive previous documentation and generate v0.4.2 docs [skip ci] 2025-12-04 05:19:26 +00:00
Michael Freno
0a57fa3ea1 v0.4.2 release 2025-12-04 00:19:04 -05:00
Michael Freno
3ee4bf1786 removed old cleanup, fix inputs 2025-12-04 00:17:04 -05:00
Michael Freno
efce61d077 streamling errorhandler calls 2025-12-03 22:19:27 -05:00
Michael Freno
940353c1ad state persistance consolidation 2025-12-03 14:34:47 -05:00
github-actions[bot]
7bdb235504 Archive previous documentation and generate v0.4.1 docs [skip ci] 2025-12-03 19:17:56 +00:00
Michael Freno
1205590973 v0.4.1 release 2025-12-03 14:17:10 -05:00
Michael Freno
c6bfd505a5 fixed texteditor cursor not blinking in immediate mode 2025-12-03 14:14:41 -05:00
Michael Freno
5bc67ecb69 blur perf warning 2025-12-03 14:08:39 -05:00
Michael Freno
2c7f8c5282 debugging 2025-11-25 22:04:49 -05:00
Michael Freno
b4016fde51 use awk 2025-11-25 21:29:43 -05:00
Michael Freno
06d87b80f3 release fix and blur improvements 2025-11-25 16:21:28 -05:00
github-actions[bot]
f1f883f5ea Archive previous documentation and generate v0.4.0 docs [skip ci] 2025-11-25 21:01:23 +00:00
Michael Freno
c9735f01b6 v0.4.0 release 2025-11-25 16:01:03 -05:00
Michael Freno
a9d6ef78b5 selectable releases 2025-11-25 15:58:57 -05:00
Michael Freno
94d1b759ae Add ModuleLoader for conditional module loading with graceful fallbacks
- Create ModuleLoader.lua with safeRequire() for optional module loading
- Implement null-object pattern for missing optional modules
- Update FlexLove.lua to use ModuleLoader for Performance, Animation, Blur, Theme, ImageRenderer, ImageScaler, ImageCache, NinePatch, and GestureRecognizer
- Add comprehensive test suite for ModuleLoader (18 tests)
- Validate FlexLove works correctly when optional modules are missing
- All tests pass (1253/1254 successes)
2025-11-25 13:27:14 -05:00
Michael Freno
57da711492 caching perf improvements - major improvements for immediate mode 2025-11-25 12:55:39 -05:00
Michael Freno
d3014200da memory tooling, state handling changes 2025-11-25 09:50:57 -05:00
Michael Freno
9918df5ea8 testing cleanup, and stop lsp warnings due to profiling 2025-11-21 13:03:59 -05:00
Michael Freno
b4420a2e21 consolidation 2025-11-20 23:17:03 -05:00
Michael Freno
a19352bc9e will consolidate down 2025-11-20 20:07:04 -05:00
Michael Freno
330d94acf7 update release info 2025-11-20 17:06:27 -05:00
github-actions[bot]
4722147454 Archive previous documentation and generate v0.3.1 docs [skip ci] 2025-11-20 21:35:57 +00:00
Michael Freno
396f588b47 v0.3.1 release 2025-11-20 16:35:34 -05:00
Michael Freno
f59c594480 coverage work 2025-11-20 16:28:34 -05:00
Michael Freno
aafb8e2af6 update api 2025-11-20 15:11:12 -05:00
Michael Freno
ab338e7a7e reversion 2025-11-20 15:10:58 -05:00
Michael Freno
92068d5315 trying to get coverage analysis to reasonable time 2025-11-20 14:27:34 -05:00
Michael Freno
d0357672db cleanup stale tests, profiling reports 2025-11-20 11:36:41 -05:00
Michael Freno
32009185e9 fixing test, making profiling 2025-11-20 09:30:01 -05:00
Michael Freno
57eb52e70d continued refactor 2025-11-19 16:49:34 -05:00
Michael Freno
21a4a29cf1 element refactor - will return to this 2025-11-19 16:14:35 -05:00
Michael Freno
e778815c5e begin major Element refactor 2025-11-19 15:37:08 -05:00
Michael Freno
8025d29ab6 cleanup 2025-11-19 14:42:58 -05:00
Michael Freno
32eda9ff8b continued refactor 2025-11-19 14:10:18 -05:00