Comments (16)
A bit caught up in work this week. I'll try to do it in the next couple of days.
Actually I was recently wondering if you were going to continue that PR. I'll definitely check perf! I've been wanting to have a good excuse to go into that for ages! ❤️
from geometry.
I always knew that much forking would come back and bite us.
Well, caching the rprompt may seem like a good solution but I'm not sure if I like it. How high is the probability that something has changed between the two consecutive prompt writes?
Also is this a symptom of a different problem: is our solution not enough? Should we consider switching to zsh-async?
from geometry.
I could try to switch between our home made implementation and zsh-async as a experiment and see if there is a difference in this regard.
I believe that caching could work in this particular context (by caching by very small amount of time, ie, <1s).
from geometry.
Well, our solution is simple and maintainable. I'd rather have that instead of having other dependencies.
I'm curious about the performance of both solutions though. How about we test them?
from geometry.
Yeah, I wanted to try zsh-async for awhile but never found a good excuse to use it.
Anyways the issue is with exec + killing subprocesses. I don't remember the reason why I choose to opt for kill a running subprocess rather than let it finish and avoid firing up a second one.
from geometry.
I remember, it was because it may show stale/invalid information.
Say I let a 5 second process run, meanwhile the user issues a git checkout other-branch
, then I print the result from the long-running process. I'll end up displaying the branch info from the previous checkout.
But anyways, taking a further look it seems that long-running git process do "lock" the git repository so it's unfeasible there is anything changing meanwhile. At least nothing obvious.
So, for the time being I'll take a look into:
- What is the git command that causes the
.git/index.lock
. See if it can be avoided. - Try out
zsh-async
. Avoid killing long-running processes.
from geometry.
Maybe related: https://gist.github.com/sindresorhus/3898739
from geometry.
I tried implementing cache at async lib and git plugin levels and both seems to be quite problematic. So I'm discarding that idea completely.
I made some perf improvements at #68 thou.
from geometry.
Do we want to close this just yet?
from geometry.
It was closed automatically from #68.
from geometry.
Looking back, the alternative would be to switch to zsh-async
, right?
I wanted to avoid adding dependencies to the project but we are definitely lacking performance. You said earlier you wanted to try out zsh async. Do you want to take this or should I?
from geometry.
I'm gonna take a look today, quite busy lately.
from geometry.
@frmendes Could you take a look at #88 and review zsh-async perf. From my side it's slower than our bare-bones implementation.
Maybe it's something wrong with my implementation but I can't catch it.
from geometry.
Can we have an update on this? Using the latest geometry version I have no lag issues on smaller repos (which were a problem as well) and my shell start time is at around ~0.15s
from geometry.
I tried this on the openframeworks/openFrameworks respository, which has about 16,000 commits over 6+ years, with master checkout taking up 3.7G. Holding down enter did not slow anything down any more than any other non-git repository.
from geometry.
I'd say this is a win for our async implementation ❤️
from geometry.
Related Issues (20)
- exec_time doesn't show in prompt HOT 2
- possibility to deactivate `hostname` HOT 12
- command not found: geometry_plugin_register when installing plugins both manually and with antigen HOT 5
- Explicit args for default plugins HOT 3
- Investigate supporting gitstatus
- Git reports errors in git submodules HOT 5
- clobber ASYNC_FD HOT 2
- Update async prompt functions independently
- Holding enter crashes on macOS HOT 7
- Prompt displays hostname after empty command HOT 1
- geometry::wrap prints unneeded space if output of called function is empty or single-space HOT 1
- GEOMETRY_INFO is surprising HOT 2
- Custom git GEOMETRY_RPROMPT spews to stderr
- GEOMETRY_CMDTITLE has issues with escape codes HOT 1
- git init produces an error: fatal: ambiguous argument 'HEAD' HOT 2
- geometry swallows output without trailing \n HOT 2
- Request - Add install tool Oh-My-Zsh HOT 3
- Newlines being removed from custom command in magic enter
- Request: Python Virtualenv as a prompt element HOT 1
- Make new gifs using vhs
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 geometry.