League-of-Foundry-Developers / compendium-browser

A module to easily browse and filter spells as well as npcs loaded from compendie
9 stars 18 forks source link

Foundry crashing when trying to setFlag on items in an imported folder. #55

Open thatlonelybugbear opened 1 year ago

thatlonelybugbear commented 1 year ago

image

  1. Import all content from a compendium.
  2. Executing something like
    for (let i of game.folders.getName("name of folder").contents) {
    if (!i.flags["scope"]?.sourceId) await i.setFlag("scope","key","value")
    }

    Hundreds of thousands such callbacks are being registered for each item that is getting updated.

Without Compendium Browser module active, no such issue.