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:
Juan Linietsky
2015-06-29 00:29:49 -03:00
parent 2b64f73b04
commit 95047562d7
62 changed files with 475 additions and 294 deletions

View File

@@ -1016,10 +1016,10 @@ void Image::create( const char ** p_xpm ) {
String line_str=line_ptr;
line_str.replace("\t"," ");
size_width=line_str.get_slice(" ",0).to_int();
size_height=line_str.get_slice(" ",1).to_int();
colormap_size=line_str.get_slice(" ",2).to_int();
pixelchars=line_str.get_slice(" ",3).to_int();
size_width=line_str.get_slicec(' ',0).to_int();
size_height=line_str.get_slicec(' ',1).to_int();
colormap_size=line_str.get_slicec(' ',2).to_int();
pixelchars=line_str.get_slicec(' ',3).to_int();
ERR_FAIL_COND(colormap_size > 32766);
ERR_FAIL_COND(pixelchars > 5);
ERR_FAIL_COND(size_width > 32767);