-
-
Notifications
You must be signed in to change notification settings - Fork 48
refactor: extract bevy_mod_scripting_asset
crate, simplify supported extensions logic
#475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
bevy_mod_scripting_asset
bevy_mod_scripting_asset
crate
bevy_mod_scripting_asset
cratebevy_mod_scripting_asset
crate, simplify supported extensions logic
|
Branch | refactor/extract-assets-crate |
Testbed | linux-gha |
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 | 4,247.90 ns(+4.79%)Baseline: 4,053.84 ns | 4,314.00 ns (98.47%) |
component/access Rhai | 📈 view plot 🚷 view threshold | 5,486.40 ns(-6.52%)Baseline: 5,869.33 ns | 6,362.11 ns (86.24%) |
component/get Lua | 📈 view plot 🚷 view threshold | 2,417.60 ns(-0.92%)Baseline: 2,439.93 ns | 2,659.61 ns (90.90%) |
component/get Rhai | 📈 view plot 🚷 view threshold | 4,074.60 ns(-6.75%)Baseline: 4,369.47 ns | 4,843.54 ns (84.12%) |
conversions/Mut::from | 📈 view plot 🚷 view threshold | 91.52 ns(+4.50%)Baseline: 87.58 ns | 93.32 ns (98.06%) |
conversions/Ref::from | 📈 view plot 🚷 view threshold | 87.44 ns(+2.69%)Baseline: 85.16 ns | 88.92 ns (98.35%) |
conversions/ScriptValue::List | 📈 view plot 🚷 view threshold | 285.22 ns(-0.11%)Baseline: 285.53 ns | 328.70 ns (86.77%) |
conversions/ScriptValue::Map | 📈 view plot 🚷 view threshold | 1,343.30 ns(+13.51%)Baseline: 1,183.41 ns | 1,598.11 ns (84.06%) |
conversions/ScriptValue::Reference::from_into | 📈 view plot 🚷 view threshold | 31.82 ns(+26.22%)Baseline: 25.21 ns | 32.69 ns (97.35%) |
conversions/Val::from_into | 📈 view plot 🚷 view threshold | 410.72 ns(+33.07%)Baseline: 308.65 ns | 414.99 ns (98.97%) |
function/call 4 args Lua | 📈 view plot 🚷 view threshold | 1,604.70 ns(-14.28%)Baseline: 1,872.08 ns | 2,163.97 ns (74.16%) |
function/call 4 args Rhai | 📈 view plot 🚷 view threshold | 1,282.70 ns(-16.13%)Baseline: 1,529.40 ns | 1,807.63 ns (70.96%) |
function/call Lua | 📈 view plot 🚷 view threshold | 238.00 ns(-1.95%)Baseline: 242.74 ns | 264.69 ns (89.92%) |
function/call Rhai | 📈 view plot 🚷 view threshold | 405.32 ns(-12.68%)Baseline: 464.20 ns | 536.71 ns (75.52%) |
loading/empty Lua | 📈 view plot 🚷 view threshold | 53,930.00 ns(-15.70%)Baseline: 63,976.90 ns | 73,834.38 ns (73.04%) |
loading/empty Rhai | 📈 view plot 🚷 view threshold | 381,560.00 ns(+0.34%)Baseline: 380,250.00 ns | 448,417.56 ns (85.09%) |
math/vec mat ops Lua | 📈 view plot 🚷 view threshold | 7,601.10 ns(-3.84%)Baseline: 7,905.00 ns | 9,153.70 ns (83.04%) |
math/vec mat ops Rhai | 📈 view plot 🚷 view threshold | 6,221.50 ns(-7.32%)Baseline: 6,712.67 ns | 7,446.43 ns (83.55%) |
query/10 entities Lua | 📈 view plot 🚷 view threshold | 20,575.00 ns(-1.63%)Baseline: 20,916.20 ns | 22,292.59 ns (92.30%) |
query/10 entities Rhai | 📈 view plot 🚷 view threshold | 18,452.00 ns(-10.26%)Baseline: 20,561.80 ns | 22,898.88 ns (80.58%) |
query/100 entities Lua | 📈 view plot 🚷 view threshold | 40,528.00 ns(-5.14%)Baseline: 42,725.00 ns | 45,188.22 ns (89.69%) |
query/100 entities Rhai | 📈 view plot 🚷 view threshold | 33,534.00 ns(+0.43%)Baseline: 33,389.10 ns | 35,721.17 ns (93.88%) |
query/1000 entities Lua | 📈 view plot 🚷 view threshold | 276,280.00 ns(-1.18%)Baseline: 279,569.00 ns | 299,446.36 ns (92.26%) |
query/1000 entities Rhai | 📈 view plot 🚷 view threshold | 173,380.00 ns(+1.77%)Baseline: 170,361.00 ns | 183,023.31 ns (94.73%) |
reflection/10 Lua | 📈 view plot 🚷 view threshold | 5,660.90 ns(-8.85%)Baseline: 6,210.51 ns | 6,847.44 ns (82.67%) |
reflection/10 Rhai | 📈 view plot 🚷 view threshold | 14,634.00 ns(-7.49%)Baseline: 15,819.50 ns | 17,043.21 ns (85.86%) |
reflection/100 Lua | 📈 view plot 🚷 view threshold | 47,195.00 ns(-8.10%)Baseline: 51,352.30 ns | 57,061.66 ns (82.71%) |
reflection/100 Rhai | 📈 view plot 🚷 view threshold | 734,450.00 ns(-4.08%)Baseline: 765,706.00 ns | 832,502.14 ns (88.22%) |
resource/access Lua | 📈 view plot 🚷 view threshold | 3,784.20 ns(+4.17%)Baseline: 3,632.88 ns | 3,888.66 ns (97.31%) |
resource/access Rhai | 📈 view plot 🚷 view threshold | 5,033.90 ns(-5.54%)Baseline: 5,329.07 ns | 5,742.42 ns (87.66%) |
resource/get Lua | 📈 view plot 🚷 view threshold | 1,977.30 ns(-4.43%)Baseline: 2,068.87 ns | 2,278.04 ns (86.80%) |
resource/get Rhai | 📈 view plot 🚷 view threshold | 3,619.10 ns(-6.62%)Baseline: 3,875.79 ns | 4,271.82 ns (84.72%) |
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
LanguageExtensions
,Language
,ScriptAsset
andScriptAssetLoader
into new cratebevy_mod_scripting_asset
.ScriptingAssetError
purely for use in this cratesupported_extensions
field to static plugin configApp::finalise
collecting supported extensions from a resource near the end of setup, preventing the footgun with ordering hereConfigureScriptAssetSettings
trait is removed and its functionality lumped into theConfigureScriptPlugin
trait viaadd_supported_extension
andremove_supported_extension
, plugins will now declare their language as well as list of extensions completely independently, yet the user will still have full controlMigration Guide
bevy_mod_scripting_core::asset
/bevy_mod_scripting::core::asset
will now need to come frombevy_mod_scripting_asset
orbevy_mod_scripting::asset
scripting_plugin.add_supported_extension("extension")
rather than via the app directly