-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Introduce extractor pool #55
Comments
Quoting your comment from the PR so we don't forget:
|
I'm currently taking a look at this, any ideas on how to best handle this spot? Line 132 in 00bce9d
Right now it seems to me like initializing the bar length before progress starts is impossible if progress is supposed to start with the first Request :/ |
@TimoFreiberg nice, thanks for looking into this! I think that at first the progressbar could be just an "unbounded spinner" indicating link extraction (as per indicatif documentation) and could then be converted into a "progress bar" once some links were buffered up to be checked. Once the progress bar is rendered, it seems to be possible to set its length using I know it's a lot of hand-waving, but I hope it makes sense 😄 Just one problem I might anticipate with this is that the number of calls to the update the progress bar (which is internally held behind a |
This can be closed because of merging #330. Ongoing work is happening in #414 |
Introduction
As of now we send each URI we'd like to check to a client pool in
main.rs
. Code is here:lychee/src/main.rs
Lines 128 to 135 in d2e349c
This is not ideal for a few reasons:
It's not necessary to block the client during this step, though as we could lazy-load the links on demand from the inputs.
main
and the link extraction. Ideally the responsibilities could should be split up to make testing and refactoring easier.We already use a channel for sending the links to check to the client pool. We could use the same abstraction for extracting the links, too in form of an extractor pool.
In the future this would allow implementing some advanced features in an extensible way:
HashSet
or even a Bloom filter (for constant memory-usage) that is maintained by the extractor pool before sending it to the client pool.How to contribute
main
on startup, pass the channel to the pool and start processing the inputs.(The other end of the channel the channel is already passed to the client pool.)
The text was updated successfully, but these errors were encountered: