GDScriptParser - don't use index operator on linked list
Index operators are super slow with linked lists. This came up in profiling the parsing, iterating sequentially using iterator is much faster.
This commit is contained in:
parent
8e7bb469b5
commit
ef914dac31
1 changed files with 2 additions and 2 deletions
|
@ -8632,8 +8632,8 @@ void GDScriptParser::_check_block_types(BlockNode *p_block) {
|
|||
}
|
||||
|
||||
// Parse sub blocks
|
||||
for (int i = 0; i < p_block->sub_blocks.size(); i++) {
|
||||
current_block = p_block->sub_blocks[i];
|
||||
for (const List<BlockNode *>::Element *E = p_block->sub_blocks.front(); E; E = E->next()) {
|
||||
current_block = E->get();
|
||||
_check_block_types(current_block);
|
||||
current_block = p_block;
|
||||
if (error_set) {
|
||||
|
|
Loading…
Reference in a new issue