Skip to content

Commit

Permalink
Improve Get call performance by replacing regex with glob matching li…
Browse files Browse the repository at this point in the history
…b for wildcard handling
  • Loading branch information
rafaeling committed May 18, 2024
1 parent 9044759 commit 43fe4e4
Show file tree
Hide file tree
Showing 4 changed files with 1,089 additions and 1,059 deletions.
2 changes: 2 additions & 0 deletions databroker/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub enum RegistrationError {
pub struct Metadata {
pub id: i32,
pub path: String,
pub glob_path: String,
pub data_type: DataType,
pub entry_type: EntryType,
pub change_type: ChangeType,
Expand Down Expand Up @@ -1155,6 +1156,7 @@ impl<'a, 'b> DatabaseWriteAccess<'a, 'b> {
metadata: Metadata {
id: temp_id,
path: name.clone(),
glob_path: name.replace('.', "/"),
data_type,
change_type,
entry_type,
Expand Down
Loading

0 comments on commit 43fe4e4

Please sign in to comment.