Skip to content
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

Potential memory usage improvement for y-js observe. #1

Open
kifhan opened this issue May 16, 2017 · 2 comments
Open

Potential memory usage improvement for y-js observe. #1

kifhan opened this issue May 16, 2017 · 2 comments

Comments

@kifhan
Copy link

kifhan commented May 16, 2017

While I fork your code, I notice that you set observe to every text file but don't unobserve them.
I'm not sure unobserve them is improve much of memory usage but I add unobserve code for fixing bug on my reply code.

fork of multihack-core

  • notice that I put it in the multihack-web for my convenience.
  • check the setObserver method
    RemoteManager.prototype.setObserver = function (filePath, targetstr) {...}

How do you think? Is going to change performance or not really effective.

@t-mullen
Copy link
Member

Hmm, yeah I should unobserve deleted files. Thanks for pointing this out.

@kifhan
Copy link
Author

kifhan commented May 17, 2017

FYI, I observe the object that only currently opened in editor.
And I do below just before open a file. (on index.js)
FileSystem.getFile(e.path).doc.setValue(self._remote.getContent(e.path))
It works fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants