Optimize validate_param
#15505
Labels
A-ECS
Entities, components, systems, and events
C-Performance
A change motivated by improving speed, memory usage or compile times
D-Unsafe
Touches with unsafe code in some way
S-Needs-Design
This issue requires design work to think about how it would best be accomplished
X-Controversial
There is active debate or serious implications around merging this PR
Uh oh!
There was an error while loading. Please reload this page.
What problem does this solve or what need does it fill?
From discord discussion: https://discord.com/channels/691052431525675048/749335865876021248/1289681891611508809
As @cart pointed out,
validate_param
doubles lookup ofget_param
, which can have significant performance impact.What solution would you like?
There are few potential ways of fixing that:
get_param
withvalidate_param
intotry_get_param
.1.1. In naive approach, we always create a system task (multithreaded executor), even if parameters can't be retrieved.
1.2. We can try to run
try_get_param
before spawning a task, but then we need to somehow pass the parameters into the system. (type erasure issues)get_param
andvalidate_param
, addtry_get_param
with default implementation that merges the previous 2.Implement manually for performance gains.
The text was updated successfully, but these errors were encountered: