-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
cider-eldoc-beginning-of-sexp is slow in large buffers #1820
Comments
I wonder what's the best approach here. I see two options:
What do you think? |
Actually a while back we introduced But the bigger question is whether eldoc is really needed in EDN buffers. |
@bbatsov I certainly don't need eldoc in EDN buffers, so that sounds reasonable to me as well. My anecdotal test on setting |
@rfkm, you're welcome to join the conversation here. |
I've committed a change that disables eldoc for EDN buffers. Guess you can try it out. |
The EDN changes worked perfectly, thanks. I did an extremely rough benchmark of the
|
Well, looking at the generated EDN file, there's just level of nesting there. Frankly, off the top of my head I can't even figure out what was causing the excessive |
@bbatsov Oh no! So sorry about this—I've been benchmarking against a different EDN file without considering that the shape is very different. I'll try to abstract it and post an updated recreate. |
It's essentially a long list of maps with this shape: ({:a {:a "",
:b {:id 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:label [""],
:description [""],
:alias [""]}}},
:b ({:a :key,
:b {:detail-page-url "",
:sales-rank 0,
:small-image {:url "",
:height 0,
:width 0},
:item-links [{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}],
:large-image {:url "",
:height 0,
:width 0},
:asin "",
:editorial-reviews [{:source "",
:content ""}
{:source "",
:content ""}],
:image-sets [{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}],
:item-attributes {:author "",
:ean "",
:isbn "",
:manufacturer "",
:product-group "",
:title ""},
:medium-image {:url "",
:height 0,
:width 0},
:offer-summary {:lowest-new-price {:amount 0,
:currency-code "",
:formatted-price ""}}},
:asin "",
:title "",
:authors [{:a "",
:b {:pageid 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:description [""],
:label [""],
:alias [""]}}}]}
{:a :key,
:b {:detail-page-url "",
:sales-rank 0,
:small-image {:url "",
:height 0,
:width 0},
:item-links [{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}],
:large-image {:url "",
:height 0,
:width 0},
:asin "",
:editorial-reviews [{:source "",
:content ""}
{:source "",
:content ""}],
:image-sets [{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}],
:item-attributes {:author "",
:ean "",
:isbn "",
:manufacturer "",
:product-group "",
:title ""},
:medium-image {:url "",
:height 0,
:width 0},
:offer-summary {:lowest-new-price {:amount 0,
:currency-code "",
:formatted-price ""}}},
:asin "",
:title "",
:authors [{:a "",
:b {:pageid 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:description [""],
:label [""],
:alias [""]}}}]}
{:a :key,
:b {:detail-page-url "",
:sales-rank 0,
:small-image {:url "",
:height 0,
:width 0},
:item-links [{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}],
:large-image {:url "",
:height 0,
:width 0},
:asin "",
:editorial-reviews [{:source "",
:content ""}
{:source "",
:content ""}],
:image-sets [{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}],
:item-attributes {:author "",
:ean "",
:isbn "",
:manufacturer "",
:product-group "",
:title ""},
:medium-image {:url "",
:height 0,
:width 0},
:offer-summary {:lowest-new-price {:amount 0,
:currency-code "",
:formatted-price ""}}},
:asin "",
:title "",
:authors [{:a "",
:b {:pageid 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:description [""
""],
:label [""
""],
:alias [""
""
""
""]}}}]}
{:a :key,
:b {:detail-page-url "",
:sales-rank 0,
:small-image {:url "",
:height 0,
:width 0},
:item-links [{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}],
:large-image {:url "",
:height 0,
:width 0},
:asin "",
:editorial-reviews [{:source "",
:content ""}
{:source "",
:content ""}],
:image-sets [{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}],
:item-attributes {:author "",
:ean "",
:isbn "",
:manufacturer "",
:product-group "",
:title ""},
:medium-image {:url "",
:height 0,
:width 0},
:offer-summary {:lowest-new-price {:amount 0,
:currency-code "",
:formatted-price ""}}},
:asin "",
:title "",
:authors [{:a "",
:b {:pageid 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:description [""],
:alias [""
""
""],
:label [""
""]}}}]}
{:a :key,
:b {:detail-page-url "",
:sales-rank 0,
:small-image {:url "",
:height 0,
:width 0},
:item-links [{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}],
:large-image {:url "",
:height 0,
:width 0},
:asin "",
:editorial-reviews [{:source "",
:content ""}
{:source "",
:content ""}],
:image-sets [{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}],
:item-attributes {:author "",
:ean "",
:isbn "",
:manufacturer "",
:product-group "",
:title ""},
:medium-image {:url "",
:height 0,
:width 0},
:offer-summary {:lowest-new-price {:amount 0,
:currency-code "",
:formatted-price ""}}},
:asin "",
:title "",
:authors [{:a "",
:b {:pageid 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:description [""],
:alias [""
""],
:label [""]}}}]}
{:a :key,
:b {:detail-page-url "",
:sales-rank 0,
:small-image {:url "",
:height 0,
:width 0},
:item-links [{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}
{:description "",
:url ""}],
:large-image {:url "",
:height 0,
:width 0},
:asin "",
:editorial-reviews [{:source "",
:content ""}
{:source "",
:content ""}
{:source "",
:content ""}],
:image-sets [{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}
{:swatch-image {:url "",
:height 0,
:width 0},
:small-image {:url "",
:height 0,
:width 0},
:thumbnail-image {:url "",
:height 0,
:width 0},
:tiny-image {:url "",
:height 0,
:width 0},
:medium-image {:url "",
:height 0,
:width 0},
:large-image {:url "",
:height 0,
:width 0},
:category ""}],
:item-attributes {:author "",
:ean "",
:isbn "",
:manufacturer "",
:product-group "",
:title ""},
:medium-image {:url "",
:height 0,
:width 0},
:offer-summary {:lowest-new-price {:amount 0,
:currency-code "",
:formatted-price ""}}},
:asin "",
:title "",
:authors [{:a "",
:b {:pageid 0,
:ns 0,
:title "",
:extract "",
:thumbnail {:source "",
:width 0,
:height 0},
:pageimage "",
:terms {:description [""],
:label [""]}}}]})}) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it. |
cider-eldoc-beginning-of-sexp
can cause Emacs to hang / freeze when visiting large buffers.Test file (adjust the
range
end to taste):Visit the resulting
test.edn
file withcider-mode
andeldoc-mode
enabled and a repl session running, then jump from the beginning of the buffer to the end of the buffer. On my system, this causes Emacs to freeze. Disablingcider-mode
is not enough as thecider-eldoc
functions are still called even aftercider-mode
has been disabled for the buffer (is this expected?). Eldoc must be disabled or the repl session must be terminated before performance will return to normal.This appears similar to what was addressed in #1502
Profile report:
Environment & Version information
CIDER version information
Lein/Boot version
Leiningen 2.6.1 on Java 1.8.0_40 Java HotSpot(TM) 64-Bit Server VM
Emacs version
GNU Emacs 25.1.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G31)) of 2016-07-29
Operating system
Mac OS X 10.11.6
The text was updated successfully, but these errors were encountered: