Open Ukendio opened 8 months ago
Case "QueryRework" is the changes to World's query reflected in the PR. Case "Without" is a separate change that does archetype negation for making more narrow subsets of queries #91 .
203 components, 3 archetypes. Looped a query that implements queryResult:without()
100 times.
When not using without
, they are equivalent in speed, favouring "QueryRework" and "Without" due to small micro optimizations
Can we get this linked to an issue that explains what the PR is solving to keep that documented for the future?
Can we get this linked to an issue that explains what the PR is solving to keep that documented for the future?
I have now edited the comment to link the relevant issue
This PR resolves #85.
At initial commit, it passes every test. No regressions and it also works well for the intended use case of chaining with
snapshot
orview
.However, the code is just glued together and will require quite a bit of polishing before I am confident in shipping this out. The code changes are the minimum steps I took to ensure it passed the tests. And I would like to make sure this code is good enough before I am confident in having it reviewed.
List of things to address first
TODO
[x] Should rework the
QueryResult
struct. It is currently a pretty big struct of data comparatively to what it was before due to it now using methods forexpand
andnext
instead of closures and consequently had to store every external variable to be reusable.[x] Should return a NOOP query when there's no compatible archetypes.
[x] Fix organization and comments. Things are a complete mess here due to the fact I had moved around a bunch of things in order to pan the code.