-
-
Notifications
You must be signed in to change notification settings - Fork 0
Explanation Choosing between FalcoInstance and InstanceContainer
Whether falco-instance is worth adopting, and where InstanceContainer remains the right choice.
Take it if any of these apply:
-
You unregister worlds while the server runs.
InstanceManager#unregisterInstanceunloads chunks only for anInstanceContainer; every chunk, tick partition and entity of any other instance is left behind. This is the reason the module exists. -
You want the light engine to keep a chunk up to date without a listener of your own.
ChunkLightScheduler#supplier()producesFalcoChunks, and since1.0.0those carry Falco's light and Falco's lifecycle on one class. Before1.0.0this combination did not work at all. - Empty sections cost you. A chunk that allocates its sections on demand retains 25 objects and 840 bytes where Minestom's retains 192 and 6 848, and on a generated overworld 62.24 % of sections hold nothing. The tables and what they do not say are in Counted.
Keep using InstanceContainer if you need SharedInstance views onto the world you are building —
see Shared worlds for what is and is not possible — or if you are relying on any of
the four Minestom sites that branch on instanceof InstanceContainer.
No speed claim. Nothing here is faster, no benchmark in this repository says it is, and the memory figures above are counts rather than timings. The distinction is spelled out in No speed gain is claimed.
FalcoChunk extends Chunk and holds a BlockStorage. Sections are created on the first write into
them; every section that holds nothing shares one instance. The read-only accessors that avoid
materialising a section are in How-to Use FalcoInstance instead of InstanceContainer.
The counts per operation — a setBlock at y = 64 materialises ten sections, all of them the
heightmap descent rather than the write — are in Reference Measured results.
- Why falco-instance exists — why the module exists, the four places a foreign instance behaves differently, and what it refuses to attempt
- Counted — the object and byte figures quoted above, with what they do not say
- Research: Instance Container — the investigation that preceded it
- Project Status — the working record, including what is still open
Related: Explanation Why falco-instance exists · Explanation Scope and non-goals · How-to Use FalcoInstance instead of InstanceContainer
Every published table lives on Reference Measured results, which owns them; a correction is made
there and nowhere else. What the ± after a JMH mean covers is defined once, in
Explanation What a measurement here means.
Wiki home · Repository · README and quick start · API documentation · Issues · Licence: AGPL-3.0
Getting started
How-to guides
- How-to Add Falco to your build
- How-to Load an Anvil world
- How-to Compute light for a loaded world
- How-to Keep chunk light up to date automatically
- How-to Use FalcoInstance instead of InstanceContainer
- How-to Migrate a world from an older version
four more
Reference
six more
Background
- Explanation Choosing between Falco and the built-in loader
- Explanation Scope and non-goals
- Explanation When light computation actually runs
- Explanation What a measurement here means
nine more
- Explanation Choosing between FalcoInstance and InstanceContainer
- Explanation How the Anvil loader is built
- Explanation How the light engine works
- Explanation How the concurrency design works
- Explanation How world migration works
- Explanation The chunk version guard
- Explanation Why a second Anvil loader
- Explanation Why a custom light engine
- Explanation Why falco-instance exists
- Explanation Comparing the light engine with Minestoms
- Explanation What the benchmarks establish
Project record
Working on Falco