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

Rewrite the namespace part of track-state #253

Merged
merged 1 commit into from
Sep 15, 2015
Merged

Conversation

Malabarba
Copy link
Member

  • Don't build the namespace map ourselves, just use ns-map.
  • Don't track changes in namespaces from jar files.
  • Since the client still needs to know what's in these jar namespaces,
    we send their info on the first message, but we ONLY do that for
    namespaces that are :require'd by a source namespace. This guarantees
    we only send namespaces that are potentially useful, and reduces the
    amount of garbage we send on the first message

This fixes a lag of about 300ms between receiving eval result and
receiving the "done" status, which translated as a lag on printing the
repl prompt.

This might solve clojure-emacs/cider#1320, depending on the size of
project namespaces, but we should probably still offer a way to disable
it.

- Don't build the namespace map ourselves, just use ns-map.
- Don't track changes in namespaces from jar files.
- Since the client still needs to know what's in these jar namespaces,
  we send their info on the first message, but we ONLY do that for
  namespaces that are :require'd by a source namespace. This guarantees
  we only send namespaces that are potentially useful, and reduces the
  amount of garbage we send on the first message

This fixes a lag of about 300ms between receiving eval result and
receiving the "done" status, which translated as a lag on printing the
repl prompt.

This might solve clojure-emacs/cider#1320, depending on the size of
project namespaces, but we should probably still offer a way to disable
it.
bbatsov added a commit that referenced this pull request Sep 15, 2015
Rewrite the namespace part of track-state
@bbatsov bbatsov merged commit d36df5b into master Sep 15, 2015
@bbatsov bbatsov deleted the rewrite-ns-tracker branch September 15, 2015 06:49
@bbatsov
Copy link
Member

bbatsov commented Sep 15, 2015

👍

@bbatsov
Copy link
Member

bbatsov commented Sep 15, 2015

Btw, a further optimization might be not to send all the vars unless the client actually needs them (depending on the config option for the font-locking). We can just add some command users have to run if they change the config.

@Malabarba
Copy link
Member Author

Fix clojure-emacs/cider#1321.

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

Successfully merging this pull request may close these issues.

2 participants