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
I encountered a performance issue using attachComments for large files with many comments.
The issue is related to lines 735 and 768 on estraverse.js that calls comments.splice(cursor, 1);.
Instead of calling splice, which is a very expensive operation that can cause performance issue if the comments array is very big, we can simply call cursor++.
I already tested it for my project and got an enormous performance improvement for attachComments, so it will be nice if we can apply this change too.
Thanks,
Niv
The text was updated successfully, but these errors were encountered:
I encountered a performance issue using
attachComments
for large files with many comments.The issue is related to lines 735 and 768 on
estraverse.js
that callscomments.splice(cursor, 1);
.Instead of calling
splice
, which is a very expensive operation that can cause performance issue if thecomments
array is very big, we can simply callcursor++
.I already tested it for my project and got an enormous performance improvement for
attachComments
, so it will be nice if we can apply this change too.Thanks,
Niv
The text was updated successfully, but these errors were encountered: