Anton Gustafsson

Results 16 comments of Anton Gustafsson

> Inside Engine#removeEntity(Entity) creates new EntityOperation of remove type (because engine right now has notifying flag); I do not think so, thanks to this check in Engine#removeEntity(Entity): ``` java if(entity.scheduledForRemoval)...

Thanks, I created a test case for this: ``` java final Engine engine = new Engine(); final Entity parent = new Entity(); final Entity child = new Entity(); // This...

This is basically the same test case, but modified to use `PooledEngine`. ``` java final PooledEngine engine = new PooledEngine(); final Entity parent = engine.createEntity(); final Entity child = engine.createEntity();...

Well, I think I've managed to implement this snapshotting. Check it out at [my fork](https://github.com/Antag99/ashley/tree/fix161). However, this introduces breaking changes (it requires some extra care to be taken by custom...

I chose snapshotting because it results in more predictable behavior. It also simplifies `Engine` a _lot_. My problem with the operation delayment was that I had an `EntityListener` that wasn't...

Benchmark results with snapshotting: ``` AshleyBenchmark.ashleyMediumTest: [measured 20 out of 40 rounds, threads: 1 (sequential)] round: 0.01 [+- 0.00], round.block: 0.00 [+- 0.00], round.gc: 0.00 [+- 0.00], GC.calls: 0, GC.time:...

Huge test (1.000.000 entities) with snapshotting: ``` AshleyBenchmark.ashleyHugeTest: [measured 20 out of 40 rounds, threads: 1 (sequential)] round: 6.44 [+- 0.71], round.block: 0.00 [+- 0.00], round.gc: 0.00 [+- 0.00], GC.calls:...

Actually, I don't think the snapshotting will be a major problem, as snapshots are recycled. The only thing that could kill the performance is nesting `begin()`/`end()` while adding/removing entities, but...

Whoops. I just noticed the benchmarks were run against the same version of ashley, `1.1.0`. Why doesn't the benchmark project reference the core, but rather an artifact in the Maven...

I fixed this in the `build-fix` branch of my repo - could you review and merge this manually, @saltares?