rationale:
* it's just boilerplate, as these just fill out the structs. can also be done at call site
* they are usually only called at one place
* it would lead to many includes (or at least forward defs) in sscsm_controller.h and
sscsm_environment.h
20 us was the value, firefox used as first response to the spectre attacks.
now it's 100 us or 5 us, depending on whether it's "cross-origin isolated".
we only have one origin, so choosing 20 us is probably fine, I guess
see also:
https://www.mozilla.org/en-US/security/advisories/mfsa2018-01/https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#security_requirements
other clocks:
* os.time() and os.date() only have seconds precision, AFAIK.
* dtime is only given once per step, so it's not useful
* there might be other ways to build clocks (if we get async envs for sscsm,
with a busy loop, for example)
tostring({}) and string.format("%s", {}) give you pointers.
(see lj_strfmt_obj)
this is not very critical, but attacks could be made harder if we change this.
the effort of overwriting is not worth it I think right now
Reduces memory usage on the server, especially with many user and/or large viewing distances.
Currently disabled on the client due to known data races on a block's data.
Large structures which are generated in on_generated callbacks
independently by Lua cannot influence decoration placement. This
change enables such a callback to assume responsibility for generating
decorations itself, presumably after structures are placed, by
disabling decorations in mg_flags and executing
core.generate_decorations.
---------
Co-authored-by: Po Lu <luangruo@yahoo.com>
These changes were initially made to improve performance. However,
on modern hardware, these changes turned out to make no difference.
This commit unifies the calculations in 'draw' and 'getDimension' and
adds comments to make it more understandable.
* Feature: Use the builtin profiler to automatically make zones for mod callback functions.
* Doc: Basic doc for builtin profiler, and better `/profiler` chatcommand help.
* Fix: `register_functions` (table of callback register function names), and `entity_instrumentation` is no longer outdated.
* Fix: Builtin profiler output is no longer printed to debug.txt or to file in world with translation escapes.
* Fix: Entity callback name generation used `obj_def.label` (normally non-existing field), now it uses the entity name.
* Small code improvements, like use of new `Settings.get_bool` with default.