Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 4, 2021

Related issue: see #22675

Description

Update the original PR with #22675 (comment).


function findAttrName( names ) {

for ( let i = 0, l = names.length; i < l; i ++ ) {
Copy link
Collaborator Author

@Mugen87 Mugen87 Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noticed that a major part of the performance drop was introduced by the for/in loop. Using a canonical one makes findAttrName() much faster (although the PR still makes the loader a bit slower than before).

Copy link
Owner

@mrdoob mrdoob Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things never change... 😁

I suspect it's okay that is a bit slower.

@Mugen87 Mugen87 added this to the r135 milestone Nov 4, 2021
@mrdoob mrdoob merged commit c875322 into mrdoob:dev Nov 4, 2021
@mrdoob
Copy link
Owner

mrdoob commented Nov 4, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants