Skip to content

Asset sort order: algorithm for sorting appears exponentially slower with more assets and bundles #14

Description

@DominicWatson

From @madmike_de:

Did some debugging. I have 8 stickerbundle.cfc files (including the extensions) with all over 194 assets. With 193 assets the sticker function calculateOrder loops about 55000 times. Adding one assets let the loop run more than 1 million times! (I exit the loop after 1mio). What I see is, that the following loop:

for( var i = 1; i < keyCount; i++ ){
  for( var n=i+1; n <= keyCount; n++ ){
    ...
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions