ruipin/fvtt-lib-wrapper

Add high-performance wrapper type.

Closed this issue · 1 comments

While negligible in most cases, libWrapper will add some overhead to wrapper calls compared to traditional wrappers.

In some cases, e.g. testWall, methods get called thousands of times in a loop, meaning that said performance hit actually becomes noticeable.

For these cases, it could make sense to add a wrapper type which does static dispatch. This type would avoid having to set up the libWrapper context, and forgo most of the libWrapper safeties, keeping only basic conflict checking and module prioritisation. Everything necessary for this wrapper should be resolved at wrapping time, similar to how the shim does it.

This is now implemented in v1.5.0.0.