Sander Mertens/flecs: Release v4.0.1
Name: flecs
Owner: Sander Mertens
Release: Flecs v4.0.1
Released: 2024-08-16
License: NOASSERTION
Release Assets:
Highlights
Lots of performance improvements! 🚀
- Queries for sparse components are up to 20x faster
get,get_mut,hasandownsare 1.5-3x faster- Cached queries are 5x faster to create, and match 1.5x faster with new tables
- Simple uncached queries are up to 2x faster than v4.0.0 (5x faster than v3.2.12)
Release notes
This version includes the following bugfixes:
[cpp]Fix crash when copying world object during shutdown (thanks @jpeletier!)[cpp]Callpopulate_selfrecursively for simple query results (thanks @Indra-db!)[core]Fix assert when toggling component from stage[core]Fix command batching issue that could prevent query rematching[core]Fix issues with commands for sparse components[core]Fix issue with cloning named entities[core]Fix assert when callingemplaceafterremovewhile deferred[queries]Fix issue with not operator, traversal and wildcards[queries]Fix issue with toggleable components and terms with#0source[queries]Fix issue withuptraversal and (re)matching empty tables[observers]Fix issue with updating observers to different callback kind[observers]Fix issue with observer for sparse component (thanks @Megafunk!)[systems]Fix issue with updating system to different callback kind[script]Fix issue where anonymous entities wouldn't clear after script update[script]Fix syntax error for scripts with only ausingstatement[script]Fix issue where unresolved component in template didn't throw an error[script]Fix issue with anonymous template instance creation[script]Fix issues with partial component assignments[script]Fix issues with assigning non-trivial components[json]Fix issues in new deserializer, serialize full paths by default[json]Fix issue with serializing entity to JSON from stage[json]Fix issues with serializing sparse components[json]Fix issue with serializing inherited components without reflection data[rest]Ensure REST HTTP server always has valid delta_time value[rest]Only enable time measurements when OS time API is initialized
This version includes the following improvements:
[cpp]Addflecs::ref<T>constructor that just takes an entity (thanks @RoyAwesome!)[cpp]Add support for iterating sparse component queries with run callback[core]Removeidandsizefields fromecs_column_t[core]Use one size/count member for all table columns[core]Addcomponent_mapto tables to improveget/get_mut/has/ownsperformance[core]Improve performance ofecs_table_get_*_indexfunctions[queries]Add dedicated iterator mode for queries that are fully cached[queries]Add dedicated iterator mode for queries that are fully trivial[queries]Don't evaluate first term of uncached queries twice[queries]Reduce branching in trivial iterator code[queries]Remove iterator mode that returned entities one by one[queries]Replaceecs_iter_t::columnswith table records array[queries]Removeecs_iter_t::ptrs[queries]Reduce number of observers created per query[queries]Reuse staticsources/idsarrays for cached results where possible[queries]Don't generate query plan for trivial queries[queries]Implement fast query validation for simple queries[meta]Add option to provide 0 offset without triggering automatic offset computation (thanks @Indra-db!)[script]Suppress variable shadowing warning for parser on msvc[json]Remove legacy (v3) deserializer[log]Fix incorrect log color comparison (thanks @kagetu!)[docs]Replaceno_readonlywithimmediatein system manual[docs]Fix link to migration guide[docs]Fix grammar in Rust query examples (thanks @waywardmonkeys!)[docs]Fix find/replace typos (thanks @waywardmonkeys!)[docs]Remove references toEcsIteratble(thanks @waywardmonkeys!)[misc]Create.gitattributesto preserve line endings on Windows (thanks @epreston!)[ci]Prevent running workflows concurrently for same branch
Benchmark results https://github.com/SanderMertens/ecs_benchmark/tree/bda57ec04f1cb9ebeacab8a17cf9a0c3353d267b
Breaking changes
- Query results with inherited components now must be explicitly handled in C API (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10186639)
- Sparse components must now be obtained with
ecs_field_at(https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10231773) - The
columns/ptrsmembers got removed from iterators (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10231797) - Member target query results have changed (https://github.com/SanderMertens/flecs/discussions/466#discussioncomment-10231905)
New Contributors
- @epreston made their first contribution in https://github.com/SanderMertens/flecs/pull/1294
- @Megafunk made their first contribution in https://github.com/SanderMertens/flecs/pull/1299
Full Changelog: https://github.com/SanderMertens/flecs/compare/v4.0.0...v4.0.1