feat!: decouple world abstractions, improve domain boundaries#529
Open
feat!: decouple world abstractions, improve domain boundaries#529
Conversation
Contributor
|
| Branch | feat/decouple-world-abstractions |
| Testbed | linux-gha |
🚨 4 Alerts
| Benchmark | Measure Units | View | Benchmark Result (Result Δ%) | Upper Boundary (Limit %) |
|---|---|---|---|---|
| conversions/Mut::from | Latency nanoseconds (ns) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 512.06 ns(+483.17%)Baseline: 87.81 ns | 113.47 ns (451.27%) |
| conversions/Ref::from | Latency nanoseconds (ns) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 667.33 ns(+690.72%)Baseline: 84.40 ns | 111.53 ns (598.37%) |
| conversions/ScriptValue::Reference::from_into | Latency nanoseconds (ns) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 33.18 ns(+30.93%)Baseline: 25.34 ns | 29.04 ns (114.23%) |
| resource/access Lua | Latency microseconds (µs) | 📈 plot 🚷 threshold 🚨 alert (🔔) | 5.95 µs(+56.95%)Baseline: 3.79 µs | 4.47 µs (133.02%) |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| component/access Lua | 📈 view plot 🚷 view threshold | 3,649.10 ns(-30.74%)Baseline: 5,268.87 ns | 8,182.42 ns (44.60%) |
| component/access Rhai | 📈 view plot 🚷 view threshold | 9,952.30 ns(+7.87%)Baseline: 9,226.34 ns | 11,545.95 ns (86.20%) |
| component/get Lua | 📈 view plot 🚷 view threshold | 3,232.80 ns(+3.85%)Baseline: 3,112.99 ns | 3,530.89 ns (91.56%) |
| component/get Rhai | 📈 view plot 🚷 view threshold | 8,694.20 ns(+10.44%)Baseline: 7,872.25 ns | 10,037.40 ns (86.62%) |
| conversions/Mut::from | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 512.06 ns(+483.17%)Baseline: 87.81 ns | 113.47 ns (451.27%) |
| conversions/Ref::from | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 667.33 ns(+690.72%)Baseline: 84.40 ns | 111.53 ns (598.37%) |
| conversions/ScriptValue::List | 📈 view plot 🚷 view threshold | 435.35 ns(+15.25%)Baseline: 377.75 ns | 461.30 ns (94.37%) |
| conversions/ScriptValue::Map | 📈 view plot 🚷 view threshold | 1,294.30 ns(+12.26%)Baseline: 1,152.97 ns | 1,495.26 ns (86.56%) |
| conversions/ScriptValue::Reference::from_into | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 33.18 ns(+30.93%)Baseline: 25.34 ns | 29.04 ns (114.23%) |
| conversions/Val::from_into | 📈 view plot 🚷 view threshold | 266.59 ns(-12.80%)Baseline: 305.72 ns | 466.75 ns (57.12%) |
| function/call 4 args Lua | 📈 view plot 🚷 view threshold | 1,984.90 ns(+1.63%)Baseline: 1,953.10 ns | 2,058.90 ns (96.41%) |
| function/call 4 args Rhai | 📈 view plot 🚷 view threshold | 1,570.60 ns(+6.93%)Baseline: 1,468.79 ns | 1,655.76 ns (94.86%) |
| function/call Lua | 📈 view plot 🚷 view threshold | 404.87 ns(+1.64%)Baseline: 398.35 ns | 458.46 ns (88.31%) |
| function/call Rhai | 📈 view plot 🚷 view threshold | 433.78 ns(-3.15%)Baseline: 447.88 ns | 532.93 ns (81.40%) |
| loading/empty Lua | 📈 view plot 🚷 view threshold | 1,018,200.00 ns(-25.80%)Baseline: 1,372,161.00 ns | 2,222,731.39 ns (45.81%) |
| loading/empty Rhai | 📈 view plot 🚷 view threshold | 1,335,700.00 ns(-21.82%)Baseline: 1,708,560.00 ns | 2,774,345.23 ns (48.14%) |
| math/vec mat ops Lua | 📈 view plot 🚷 view threshold | 9,643.10 ns(-4.09%)Baseline: 10,054.31 ns | 11,610.77 ns (83.05%) |
| math/vec mat ops Rhai | 📈 view plot 🚷 view threshold | 8,563.00 ns(-6.95%)Baseline: 9,202.64 ns | 10,028.15 ns (85.39%) |
| query/10 entities Lua | 📈 view plot 🚷 view threshold | 21,450.00 ns(-6.00%)Baseline: 22,819.20 ns | 28,265.76 ns (75.89%) |
| query/10 entities Rhai | 📈 view plot 🚷 view threshold | 31,327.00 ns(+5.77%)Baseline: 29,616.80 ns | 33,838.87 ns (92.58%) |
| query/100 entities Lua | 📈 view plot 🚷 view threshold | 44,800.00 ns(+0.85%)Baseline: 44,421.00 ns | 54,893.66 ns (81.61%) |
| query/100 entities Rhai | 📈 view plot 🚷 view threshold | 46,458.00 ns(+7.10%)Baseline: 43,379.90 ns | 49,094.38 ns (94.63%) |
| query/1000 entities Lua | 📈 view plot 🚷 view threshold | 287,180.00 ns(+2.82%)Baseline: 279,306.00 ns | 352,304.20 ns (81.51%) |
| query/1000 entities Rhai | 📈 view plot 🚷 view threshold | 207,480.00 ns(+10.06%)Baseline: 188,523.00 ns | 231,258.10 ns (89.72%) |
| reflection/10 Lua | 📈 view plot 🚷 view threshold | 5,419.40 ns(-3.52%)Baseline: 5,616.95 ns | 6,113.90 ns (88.64%) |
| reflection/10 Rhai | 📈 view plot 🚷 view threshold | 15,114.00 ns(+0.97%)Baseline: 14,969.00 ns | 16,390.18 ns (92.21%) |
| reflection/100 Lua | 📈 view plot 🚷 view threshold | 44,967.00 ns(-4.47%)Baseline: 47,069.30 ns | 51,577.35 ns (87.18%) |
| reflection/100 Rhai | 📈 view plot 🚷 view threshold | 705,380.00 ns(+2.83%)Baseline: 685,961.00 ns | 811,858.94 ns (86.88%) |
| resource/access Lua | 📈 view plot 🚷 view threshold 🚨 view alert (🔔) | 5,950.50 ns(+56.95%)Baseline: 3,791.23 ns | 4,473.48 ns (133.02%) |
| resource/access Rhai | 📈 view plot 🚷 view threshold | 9,455.40 ns(+9.75%)Baseline: 8,615.19 ns | 10,851.85 ns (87.13%) |
| resource/get Lua | 📈 view plot 🚷 view threshold | 2,524.90 ns(-5.17%)Baseline: 2,662.67 ns | 3,189.29 ns (79.17%) |
| resource/get Rhai | 📈 view plot 🚷 view threshold | 8,372.00 ns(+12.40%)Baseline: 7,448.09 ns | 9,543.50 ns (87.72%) |
Owner
Author
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
The
bevy_mod_scripting_bindingscrate is bigger than it needs to, it would be ideal to have the ability to extend the world guard in separate crates, this PR is one step towards that.I extracted the "cached" registry components into something less typed so that I could pull out
bevy_mod_scripting_worldwhich doesn't know about these, and instead alot of the functionality is pushed intobevy_mod_scripting_bindings, via the newWorldExtensionstrait.I also removed
ReflectAccessIdin favor ofWorldAccessRangemaking the world crate a bit more opinionated on what kind of accesses exist