[Solved] Editor freezes when opening certain files


#1

When I go to open https://gomix.com/#!/project/standard-prototype, and open certain files of mine like “classes.js”, and a few others, the editor freezes. It looks like the code appears, but it scrolls extremely slow, if it can scroll at all. Is a way to fix this? I have tried a variety of browsers like Chrome, Firefox, and Edge.


#2

Hi jaredyork,

We are sorry to hear that! We added a few new functionality to the editor, and perhaps some of them are leaking memory. Can you please mark your project as public, so that we can look into it? Or if you don’t want, can you create a new project and move the relevant files there?

Thanks!


#3

I just made the project public, thanks!


#4

Hi jaredyork,

apparently, the problem is partially related with the new linting functionality (that is, the code that shows errors like unexisting variables or wrong syntax), which of course makes the editor slow for large files. I’ve tried to disable it (open the webconsole and set eslint = null), and the editor, even if still slow, can now handle classes.js.

I would suggest, if possible, to split classes.js into several smaller files. Unfortunately, a JS files with almost 5000 lines will always be pretty inefficient to handle through a web editor… I am sure that the added benefit of a linter will pay off, if you take the time to split it.

In the meantime, I’ve opened a bug report and we will try to figure out which paths we can take to make the editor more performant on large files.

If you have any problem, please keep reporting :slight_smile:

Thanks, and sorry for the inconvenience!

EDIT: the other piece that makes the editor slow on classes.js is the syntax highlight. Another functionality that I think you would like to have enabled. If I forcefully disable both the linter and the syntax highlight, the editor can easily handle classes.js.


#5

If you find it impossible to split the file yourself because of the editor slowness, I can try to do it for you.


#6

Hi etamponi,

Thanks for the explanation. What I found strange is last Friday afternoon (EST), it was working extremely smoothly, then that night after no code modifications, that’s when the issues started.

I decided just to work on the project offline as it will be much easier to edit the large files. I am working on this project with a friend at school. We can’t afford to lose time dealing with separating the code into different chunks. I think for our use-case it would just be easier to work on the project offline. Thanks for your help though, we will consider HyperDev in the future.


#7

Hi jaredyork,

That’s unfortunate :frowning: on Friday afternoon we replaced the previous editor with a new one that provides more functionality… Apparently, it doesn’t scales as well!

Thanks for the feedback thought, we will sure investigate ways of improving the situation!

If you want to go for the offline approach, you can use our GitHub import feature to import a GitHub repository, that will then run inside Gomix :slight_smile:

Thanks again, happy coding!


#8

Hi jaredyork,

thanks again for your feedback, it has been greatly valuable! We found what was causing the slowness and fixed it. I’ve tested the editor with a very big file myself (around 4000 lines) and it works very well now.

I hope you’ll reconsider coming back to us :slight_smile: if it is still slow for your likes, let us know!

Happy coding!

PS: it might happen that your browser caches the old version of the editor. If that’s the case, please try the following (on Chrome):

  1. open the developer tools
  2. long click on the refresh button on your address bar
  3. click on “Empty cache and hard reload”

#9

I added back in my classes.js file, and so far it works as smooth as butter. I will report back with further results as I move everything back.

I really appreciate how your team quickly took a look into this issue and fixed it. It looks like we’ll be using Gomix again. :smiley:


#10

I have finished moving the offline code back over, everything seems to be working great! I would consider this question solved.


#11

Great :slight_smile: thank you!