Skip to content
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

Parallelize fetching #4

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "fs", "ti
futures = "0.3.28"
html2md = "0.2.14"
readability = "0.2.0"
parking_lot = "0.12.1"
async-trait = "0.1.73"

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ placed at `~/.config/bogrep` in your home directory:
``` json
{
"cache_mode": "text",
"max_concurrent_requests": 100,
"max_parallel_requests": 100,
"request_timeout": 60000,
"request_throttling": 3000,
"max_idle_connections_per_host": 10,
Expand All @@ -227,7 +227,7 @@ placed at `~/.config/bogrep` in your home directory:
where `request_throttling` is the waiting time between requests for the same
host in milliseconds.

Too speed up fetching, set `max_concurrent_requests` to e.g. 1000. The maximum
Too speed up fetching, set `max_parallel_requests` to e.g. 1000. The maximum
number of available sockets depends on your operating system. Run `ulimit -n` to
show the maximum number of open sockets allowed on your system.

Expand Down
7 changes: 7 additions & 0 deletions src/bookmarks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ use std::{
};
pub use target_bookmarks::{TargetBookmark, TargetBookmarks};

/// The action to be performed on the bookmark.
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)]
pub enum Action {
Add,
Remove,
}

/// The type used to identify a source.
#[derive(Debug, Clone, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SourceType {
Expand Down
Loading
Loading