Zachare S. said: It appears that this update for switching Dynamic Lighting between Legacy and New has now affected the Legacy system. Prior to the update, scrolling the screen, typing, and clicking on things was on separate threads. You might have had to wait a little for the system to catch up, but you could queue up a few different actions. Unfortunately, today, when playing from 6pm to 10pm, it looks like updates on the map and scrolling around have been placed squarely on the same worker thread, the User Interface thread. What ends up happening is that if any player moves their token, everyone, including the player that moved the token freezes until the screen updates. With 5 players, it slowed down my games significantly. It appears that its only caused by moving the player's tokens, but it causes some severe problems. I've also noticed that loading time has *severely* increased (3-4x, upwards of 2 minutes in some cases). Settings: Fog of War - Off Advanced Lighting - On (Dim Light Reveals) Dynamic Lighting - On (Enforce Line of Sight, Only Update on Drop) New Dynamic Lighting - Off I have verified that every token does not have the new Dynamic Lighting system online. I also have verified that moving the tokens without players online causes the same issue. Being a programmer, I thought I'd do a little digging on what is going on. I did a performance check, and I found this d20.engine.advanced_fog.computeVisibleCells is being called many times. In fact, out of the 4952.7 milliseconds that we're being held on the same thread, this function is taking up 4929.7ms. This shows a *very* inefficient Function is being put right in the middle of the Render Thread, causing lockups from everyone. So, I did a little more debugging... It seems that, inside of this Advanced Fog, you're calling clone over and over again, called by this d20.math.sub. Cloning an object runs through and asks for each individual property of each individual thing to put back into this object, and then throw in modifications to that object. This is *extremely* inefficient... In your *BEST* case scenario, this is called three times in one execution. However, with this function, it is called *THOUSANDS* of times. Because of this constant cycle of cloning, substitution, and replacement, Roll20 ends up calling this function thousands of times with any map that has a decent number of lines to it. Now, this function normally wouldn't be a problem, but due to no caching going on with this function, and its average time to compute taking 0.7 milliseconds, a mildly complicated map will take about 4.5 seconds to compute *PER* move. What is the solution? Well, one thing that can be done is to stop using d20.math.sub as often as it is here. In fact, one call can be removed with const n = d20.math.sub(t,o), as it is already being stored at const i = d20.math.sub(t, o). If you need const n to be a substitution of d20.math.sub(t,o), then you can just change return d20.math.dot(s, a) to return d20.math.dot(s, i) The actual make of const n = d20.math.sub(t, o) is redundant, and leads to extra executions. The additional problem is that you can, instead, try to cache your outputs to keep those variables in memory without rebuilding them for every execution. Q: But won't n = d20.math.sub(t, o) be the same over and over again because its labelled as const? A: Ahh! No, it won't, because const doesn't mean that const is a constant like in C#. In JavaScript const actually means "readonly." It cannot be reassigned once set, but it acts like any other variable. If you end up closing an if statement, obliterating an anonymous function, that memory address is destroyed, and when you come back to the const variable, it builds it over again. Q: How would you prevent this from being calculated over and over again? A: I would label these as vars I could reassign, and instead of cloning, I would edit them directly. Unless I'm really paranoid that the individual items would be called by the initial function, I wouldn't utilize the cloning function. Its unnecessary bloat. If I'm worried that pre-calling functions would be messed up if I substituted an item, I would call clone(e) on the first line right after the function started, and set that as a variable. Then, I would substitute the variables inside of that new variable. Hey Zachare S. - Thank you for the awesome feedback here! Our development team is currently investigating this and we’ll be sure to keep you updated as we review!