Closed player-03 closed 1 year ago
Also, any chance you could turn on Issues for this repo? I have questions/comments, but there's nowhere to put them.
It'll be on the settings page, under "features."
Sorry, I totally missed this. I'll turn on issues.
I added the features. I will look at your PR.
I also just renamed the depot. Sorry if that causes you any issues.
Would you mind resolving against the changes? There's been so many it's hard to see through it.
Finally done, I think.
Ok, but for the record, the issue is still very much present.
macro if (__entity__.isActive()) {
for (v in ecs.Workflow.views) { // <- inefficient
@:privateAccess v.addIfMatched(__entity__);
}
}
You're iterating through all views each time you add any component, despite the fact that most of those views don't even include that component and therefore couldn't possibly be affected.
Agreed. Nice to hear from you again.
I haven't had a lot of time to look at this but I've come into some more time now and was going to take a look.
I'm not sure why it said I closed the issue? I didn't touch the issue status.
Oh, ok. I'll put it back then.
Whatever happened, it prompted me to look at your latest change, which I'm actually considering using. So that's good.
huh? why is it auto closing?
Reopening.
All the changes disappeared, what is going on?
I'll open a new one.
I was browsing your branch. You've done an impressive amount of updates.
Thanks. Hope you can find some useful stuff in there. And I'm happy to explain if you find anything confusing.
Betting it broke because player-03/echoes is no longer a fork. So I sent the new pull request from my forked repo instead.
Instead of attempting to add an entity to ALL views, it's best to check only views of the newly-added component. So if you add a
String
component, the function will callViewsOfComponentString.inst().addIfMatched()
instead of iterating throughWorkflow.views
.Interestingly,
entity.remove()
was already optimized this way, so I assume this was an oversight.