Several performance improvements, mainly in loading and instancing scenes and resources.
A general speedup should be apparent, with even more peformance increase when compiling optimized. WARNING: Tested and it seems to work, but if something breaks, please report.
This commit is contained in:
parent
2b64f73b04
commit
95047562d7
62 changed files with 475 additions and 294 deletions
|
|
@ -34,7 +34,7 @@ bool SampleLibrary::_set(const StringName& p_name, const Variant& p_value) {
|
|||
|
||||
if (String(p_name).begins_with("samples/")) {
|
||||
|
||||
String name=String(p_name).get_slice("/",1);
|
||||
String name=String(p_name).get_slicec('/',1);
|
||||
if (p_value.get_type()==Variant::NIL)
|
||||
sample_map.erase(name);
|
||||
else {
|
||||
|
|
@ -66,7 +66,7 @@ bool SampleLibrary::_get(const StringName& p_name,Variant &r_ret) const {
|
|||
|
||||
if (String(p_name).begins_with("samples/")) {
|
||||
|
||||
String name=String(p_name).get_slice("/",1);
|
||||
String name=String(p_name).get_slicec('/',1);
|
||||
if(sample_map.has(name)) {
|
||||
Dictionary d;
|
||||
d["sample"]=sample_map[name].sample;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue