-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update changelog + agg-hash speedup (#123)
* lint cleanup and webp cleanup * mbt lint fix clippy * fix panic * use stream for agg-hash! * clippy so angry * still making clippy happy * agg hash uses stream is much much faster * clean copy * update'
- Loading branch information
1 parent
de92b0f
commit e552752
Showing
28 changed files
with
604 additions
and
249 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
use crate::cli::args::AggHashArgs; | ||
use crate::errors::UtilesResult; | ||
use crate::mbt::hash_types::HashType; | ||
use crate::mbt::mbt_agg_tiles_hash; | ||
use crate::sqlite::AsyncSqliteConn; | ||
use crate::mbt::mbt_agg_tiles_hash_stream; | ||
use crate::utilesqlite::{MbtilesAsync, MbtilesAsyncSqliteClient}; | ||
|
||
// pub async fn agg_hash_main(args: &AggHashArgs) -> UtilesResult<()> { | ||
// let mbt = MbtilesAsyncSqliteClient::open_readonly(&args.common.filepath).await?; | ||
// mbt.register_utiles_sqlite_functions().await?; | ||
// let hash_type = args.hash.unwrap_or(HashType::Md5); | ||
// let filter = args.filter_args.tiles_filter_maybe(); | ||
// let result = mbt | ||
// .conn(move |c| Ok(mbt_agg_tiles_hash(c, hash_type, None, &filter))) | ||
// .await??; | ||
// println!("{}", serde_json::to_string_pretty(&result)?); | ||
// Ok(()) | ||
// } | ||
pub async fn agg_hash_main(args: &AggHashArgs) -> UtilesResult<()> { | ||
let mbt = MbtilesAsyncSqliteClient::open_readonly(&args.common.filepath).await?; | ||
mbt.register_utiles_sqlite_functions().await?; | ||
let hash_type = args.hash.unwrap_or(HashType::Md5); | ||
let filter = args.filter_args.tiles_filter_maybe(); | ||
let result = mbt | ||
.conn(move |c| Ok(mbt_agg_tiles_hash(c, hash_type, None, &filter))) | ||
.await??; | ||
let result = mbt_agg_tiles_hash_stream(&mbt, hash_type, None, &filter).await?; | ||
println!("{}", serde_json::to_string_pretty(&result)?); | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.