Comments (3)
Hi @mizlan!
This is something I have thought about from time to time. My personal use case for zf is usually within the scope of a single project, so I rarely have over 10,000 files to read into zf. This means I haven't given much thought to a incremental display.
As you have observed, the current zf implementation is blocking. All of stdin is read into a buffer which is then split on lines. Those lines are then given to the UI code. The UI only runs the filtering on keypresses. So that's why you are seeing the current behavior.
But I am planning on adding a UI preview feature sometime soon (once the next Zig version is released): #25. It seems like the next version will be the end of the month.
That feature will require me to rework the event loop to be more async. As part of that, I think it would not be difficult to read from stdin in batches to make the UI immediately available.
Another side to this is multithreading the filtering of zf. For large batches of input lines, the other issue would be making sure the filtering is very fast.
Feel free to let me know your thoughts on that!
from zf.
My personal use case for zf is usually within the scope of a single project, so I rarely have over 10,000 files to read into zf
Same! I was just curious I guess, it isn't a real problem for me almost ever in practice.
Another side to this is multithreading the filtering of zf. For large batches of input lines, the other issue would be making sure the filtering is very fast.
I think multithreading would be very very cool and interesting to see! Though I am interested in the Zig language, I am not super experienced in writing multithreaded programs, so I'm afraid I can't contribute too much, but I will be excitedly watching for updates to zf :)
from zf.
Same! I was just curious I guess, it isn't a real problem for me almost ever in practice.
In that case I'll keep this issue open, but wait and see if there is someone with that use case. I am open to it right now, but I don't want to implement it if I don't need to.
I think multithreading would be very very cool and interesting to see! Though I am interested in the Zig language, I am not super experienced in writing multithreaded programs, so I'm afraid I can't contribute too much, but I will be excitedly watching for updates to zf :)
I'll probably get to this in the next few weeks if everything goes according to plan :)
from zf.
Related Issues (20)
- alternative algorithm HOT 2
- Feature request: Custom deliminator HOT 1
- doesnt't build on current master HOT 2
- some problems that block me adopting zf HOT 4
- Respond to `SIGWINCH`
- Evented IO HOT 1
- Ranking improvements
- Buffer writing to stdout
- Usable as C library? HOT 1
- Which Zig version works? HOT 9
- Replace `--lines` with `--height`
- Improve zfâs speed HOT 5
- Add newlines after usage
- Error parsing arg after short option
- Remove `--lines`
- Support for fzf syntax HOT 4
- Add a potentially new option `-0` for NUL-separated lines. HOT 1
- Issue with system and linking libc
- Highlights and selected row go off screen
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 zf.