Comments (2)
Sure, this is a good idea. The 25 seconds is fairly arbitrary. I didn't want Critic processes hanging around forever, especially if they've hung or are otherwise not needed. Some related thoughts below:
A config parameter would be straightforward. Alternatively, I could add a "large document mode" for files > N lines that would automatically increase this value. The other piece worth considering is the delay between making changes and kicking off diagnostics. When editing, the Navigator doesn't run critic (or perl -c
) on every change event, it waits until the user hasn't typed for 1 second. If we're in "large document mode", it might be worth waiting an extra second or so since it's going to take a long time anyway.
PerlNavigator/server/src/server.ts
Line 228 in fc14c47
Related, the Navigator doesn't kill processes that are no longer needed. If you are editing a file (with typing gaps of at least 1 second), the Navigator will keep spinning off subprocesses to run perl -c
and perlcritic
. These can pile up a bit and starve other processes of resources, especially on machines/containers with fewer cores. The 1 second wait prevents too many from running simultaneously, but killing processes is another option.
from perlnavigator.
Thanks for thinking about this.
A "large document mode" is interesting and makes sense. Or perhaps values which are proportional to the size of the document? But in any case there still might be times the values need to be overridden somehow.
I currently have debounce_text_changes = 5000
in my neovim perlnavigator config which, I think, does something similar and won't run navigator more then once every five seconds. I'm happy to wait a little longer to get answers and use a little less power.
In the meantime I have increased the timeout locally and everything is working well.
from perlnavigator.
Related Issues (20)
- namespace::autoclean update issues HOT 7
- lsp-mode defaults to using PerlNavigator HOT 1
- VSCode - Seem unable to get perltidy to trigger HOT 2
- TypeError *.replace|replaceAll is not a function in neovim HOT 3
- inquistor failed with error: Can't Regexp::Common::FIRSTKEY HOT 3
- perlnavigator triggers a registerCapability handler for workspace/didChangeConfiguration despite dynamicRegistration set to false HOT 1
- Highlighting of bitshift operator with constants HOT 5
- Highlighting of split HOT 2
- Publish 0.8.0 to open-vsx registry HOT 1
- Incorrect syntax errors reported with Carp::cluck HOT 2
- Allow use of more predefined VS Code variables in include paths HOT 1
- File::Find dies when a duplicate file is found HOT 2
- Extension not working out of the box in vscode for me HOT 4
- Publish new release to npm HOT 3
- Changelog.md not updated HOT 1
- Perhaps this repo can be hosted on https://github.com/perl-ide? HOT 1
- Support configuration with .vscode/settings.json
- Use a code formatter like Prettier HOT 1
- autocomplete: keep showing function prototype after selection HOT 2
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 perlnavigator.