-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The web page does not respond when deleting more than 400 lines of code using Ctrl+A #67
Comments
CodeJar not designed as performant code editor, rather than small and lightweight. Also, try to profile codejar, that is bottleneck? |
Thank you for your reply. I tried it under the official Demo and got the same result (https://medv.io/codejar/). I type 400 lines of Javascript in the code box of the web page and delete them all will also cause slow performance. I don't know the exact reason, but it may be a performance problem caused by the removal of a large number of HTML elements at the same time. |
Yes remove is expensive operation for DOM. I don’t know any ways to improve it. |
Also it maybe issue with contenteditable. |
Node:
v14.15.1
OS:
Windows 10
About 400 lines of Javascript code, select and delete all, and the whole page will be unresponsive for about 5 seconds.
Code:
Changing the
highlightFunc
function to this will solve this problem, but you will lose the text color.Is there any better way to solve this problem?
The text was updated successfully, but these errors were encountered: