You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: when you build react-vis with latest webpack in production mode each call to handleNearestXY will take 4-5 times longer on average. I have been able to narrow it down to one of the dependencies. Voronoi instance generation time on each mouse move changes dramatically with mode production.
Problem occur here (d3-voronoi Diagram constructor):
while (true) {
circle = firstCircle;
if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {
if (site[0] !== x || site[1] !== y) {
addBeach(site); //This guy
x = site[0], y = site[1];
}
site = sites.pop();
} else if (circle) {
removeBeach(circle.arc); //And his friend
} else {
break;
}
}
After trying different sets of options i have been able to remove unwanted behavior setting unused option in uglifyOptions to false:
which magically changes performance back to normal. Although this fixes my problem, I'm still struggling to understand what is going on and why this problem arise. I created repo to demonstrate issue: https://github.com/WildHorse19/react-vis-uglify-performance-drop
In order to see difference just do npm run slow, npm run fast and simply try to drag mouse pointer.
The reason i decide to mention this here is because its really hard to spot this one, webpack comes with set of defaults in production mode and so happens that compression and unused:true is one of the defaults, also this wont be noticeable with small data sets.
The text was updated successfully, but these errors were encountered:
Description: when you build react-vis with latest webpack in production mode each call to handleNearestXY will take 4-5 times longer on average. I have been able to narrow it down to one of the dependencies. Voronoi instance generation time on each mouse move changes dramatically with mode production.
Problem occur here (d3-voronoi Diagram constructor):
After trying different sets of options i have been able to remove unwanted behavior setting unused option in uglifyOptions to false:
which magically changes performance back to normal. Although this fixes my problem, I'm still struggling to understand what is going on and why this problem arise. I created repo to demonstrate issue:
https://github.com/WildHorse19/react-vis-uglify-performance-drop
In order to see difference just do npm run slow, npm run fast and simply try to drag mouse pointer.
The reason i decide to mention this here is because its really hard to spot this one, webpack comes with set of defaults in production mode and so happens that compression and unused:true is one of the defaults, also this wont be noticeable with small data sets.
The text was updated successfully, but these errors were encountered: