diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-29 00:29:49 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-29 00:29:49 -0300 |
commit | 95047562d743b1c1fdc007432c8a0c145a455c5d (patch) | |
tree | f563e5c900c4330fcc602b6e5a721bc63022b253 /main | |
parent | 2b64f73b0459190d20b2f6de39275ee7979317c4 (diff) |
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.
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp index 15f969f466..f68bde003e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -524,8 +524,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas ScriptDebuggerRemote *sdr = memnew( ScriptDebuggerRemote ); uint16_t debug_port = GLOBAL_DEF("debug/remote_port",6007); if (debug_host.find(":")!=-1) { - debug_port=debug_host.get_slice(":",1).to_int(); - debug_host=debug_host.get_slice(":",0); + debug_port=debug_host.get_slicec(':',1).to_int(); + debug_host=debug_host.get_slicec(':',0); } Error derr = sdr->connect_to_host(debug_host,debug_port); @@ -546,8 +546,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas file_access_network_client=memnew(FileAccessNetworkClient); int port; if (remotefs.find(":")!=-1) { - port=remotefs.get_slice(":",1).to_int(); - remotefs=remotefs.get_slice(":",0); + port=remotefs.get_slicec(':',1).to_int(); + remotefs=remotefs.get_slicec(':',0); } else { port=6010; } @@ -1219,7 +1219,7 @@ bool Main::start() { String s = E->get().name; if (!s.begins_with("autoload/")) continue; - String name = s.get_slice("/",1); + String name = s.get_slicec('/',1); String path = Globals::get_singleton()->get(s); RES res = ResourceLoader::load(path); ERR_EXPLAIN("Can't autoload: "+path); |