Comments (10)
I'm recently experiencing performance issues in Emacs every time generating a documentation for pcase
is needed. I've narrowed the issue down to when calling (documentation 'pcase)
, which can easily take tens of seconds, and eventually causes issues in code completion or searching documentation via helpful
functions. I don't have a final proof, but I highly suspect lsp-mode adding so many pcases there is contributing a lot to it.
Running emacs master branch on 2024-07-15
eae1104f97ef944127eb5c977129b55f137e0830 and I see couple of changes in pcase recently, so it might be contributing to this.
from lsp-mode.
I like your proposal especially when it has the precedent of cl-struct
.
Would you be willing to provide a PR for that? This will be a breaking change, but it would gear toward a better functionality as well documentation readability for pcase
.
@leungbk as well.
from lsp-mode.
@kiennq Yeah! I started looking into it a bit last week. I can say that there doesn't seem to be any way to deprecate a pcase
form defined with pcase-defmacro
, like one would a normal function or macro, so that's something that would need to be communicated separately.
(I tried using (declare (obsolete …))
, and also make-obsolete
on the NAME--pcase-macroexpander
function it generates. Unfortunately the byte compiler never actually sees a (NAME--pcase-macroexpander …)
form when compiling (pcase … ((NAME …))
—the NAME--pcase-macroexpander
function is called directly while expanding the pcase
macro—so there's no deprecation warning. Also, the way that pcase
builds its docstring means it won't generate a deprecation warning there either.)
from lsp-mode.
Maybe deprecating is not much as issue, if the macros are only used in the same package.
from lsp-mode.
That's actually something I'm unclear on: are these pcase forms part of lsp-mode's public interface? Or are they only an internal implementation detail? I'm only an lsp-mode end user, so I'm not familiar with the conventions.
I was planning to keep the old pcase forms around in this PR, delegating to the new one—then they could be dropped in the next major version. If they are only meant to be used internally, then maybe we can just drop them now. (Though, of course, Hyrum's Law might apply…)
from lsp-mode.
I just opened #4559 as a draft. It currently adds the new (lsp-interface INTERFACE ...)
pcase form and preserves the old per-interface forms as well. I'll start replacing uses of the old pcase forms in lsp-mode next.
from lsp-mode.
@yyoncho @leungbk, is it okay to drop support for the old pcase
form? It makes Emacs slower (might be due to a bug in the new version) and also pollute the pcase
docs so more relevant forms are hidden.
We can announce this as a breaking change in the CHANGELOG so broken packages that depends on the old behaviors can fix it if they want.
from lsp-mode.
from lsp-mode.
I'm OK with dropping the old form.
That does simplify things. 🎉
from lsp-mode.
Sorry for all the commit noise. I think that PR is ready for review. 👍
from lsp-mode.
Related Issues (20)
- lsp-java + semgrep-ls - slow completion
- use lsp-install-server to install C# (csharp-roslyn) failed on mac os 14.5, M3 Pro chip HOT 1
- c++ rename destroys code (clangd) HOT 1
- lsp-show-workspace-symbol doesn't work on omnisharp-roslyn if lsp uses plists instead of hashmap
- Clojure completion of aliased dependencies only works in the REPL HOT 5
- lsp--cur-workspace not propegated when using lsp-find-definition-mouse
- Can't install kotlin language server HOT 2
- The performance of `lsp--try-project-root-workspaces` has significant room for improvement
- lsp-pwsh: PowerShell workflow syntax HOT 1
- Emacs freezes with `lsp-doc-enable-hover` enabled on large text (ts-ls) HOT 1
- lsp-typescript: fails to correctly resolve `tsserver` on NixOS HOT 3
- lsp-mode hangs when parsing system headers HOT 3
- Installation failed. HOT 4
- LSP ruff shows outdated syntax errors HOT 27
- lsp-describe-session is too slow HOT 1
- Lsp Hover causes desktop spaces to be switched to the previous one on MacOs Sequoia
- Elixir: Allow configuration of test runner color output
- Update lsp-mode recipe in MELPA to include lsp-roslyn-stdpipe.ps1
- Ignore `.pixi` folder HOT 1
- Something gets stuck on "Parsing is_mem_fun_pointer_impl.hpp (LL)..." HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-mode.