The idea is to keep and store constructed DslBundle for each Entity. To keep track of the hierarchy, we could use the child_count method, similarly to how the AST is handled, and how scenes are loaded in https://github.com/nicopap/bvyfst/tree/main/hollow_scene.
Basically, it's just pre-processing the scene file and save it as an array of the relevant DslBundle.
The primary use case would be obfuscation, but it has a legitimate perf concern:
No need to parse the arguments to each method (using ReflectSerialize), nor run each method. The DslBundle is pre-build.
No need to have each and every concerned component be Reflect or Serialize, the only thing that maters is the DslBundle type.
No need to interpret the AST into a DslBundle, it is pre-built. This means: no need for loading several files, executing templates etc. Although with #94, we would probably need to have a solution for dynamic queries.
Although depending on the serialization format, we might still have considerable parsing overhead. With something like rkvy or bincode, it is likely the parsing overhead is lower
Running a zip compression pass is trivial and could potentially greatly reduce asset sizes
Obfuscation: Preprocessing into a binary format allows delivering files that require more work than just opening with Notepad++
We could eventually gate the parser/AST/interpreter behind a feature flag so that games can be shipped without it.
The idea is to keep and store constructed
DslBundle
for eachEntity
. To keep track of the hierarchy, we could use thechild_count
method, similarly to how the AST is handled, and how scenes are loaded in https://github.com/nicopap/bvyfst/tree/main/hollow_scene.Basically, it's just pre-processing the scene file and save it as an array of the relevant
DslBundle
.The primary use case would be obfuscation, but it has a legitimate perf concern:
ReflectSerialize
), nor run each method. TheDslBundle
is pre-build.Reflect
orSerialize
, the only thing that maters is theDslBundle
type.DslBundle
, it is pre-built. This means: no need for loading several files, executing templates etc. Although with #94, we would probably need to have a solution for dynamic queries.rkvy
orbincode
, it is likely the parsing overhead is lowerzip
compression pass is trivial and could potentially greatly reduce asset sizes