diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-06-09 12:17:54 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-06-10 15:17:01 -0400 |
| commit | 43d478cf39f8faef9cf9d16ca47d3edd8152f4cb (patch) | |
| tree | 95e60d5e324243246455e03dc0e6f47d7530327a /rust/examples/pdb-ng/src/lib.rs | |
| parent | d2ee93856b455a2fbd5a42b52bfe847d1c7f29d1 (diff) | |
Large PDB parsing performance improvements
Diffstat (limited to 'rust/examples/pdb-ng/src/lib.rs')
| -rw-r--r-- | rust/examples/pdb-ng/src/lib.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rust/examples/pdb-ng/src/lib.rs b/rust/examples/pdb-ng/src/lib.rs index 95407636..e2e3ec44 100644 --- a/rust/examples/pdb-ng/src/lib.rs +++ b/rust/examples/pdb-ng/src/lib.rs @@ -364,13 +364,15 @@ impl PDBParser { ) -> Result<()> { let mut pdb = PDB::open(Cursor::new(&conts))?; + let settings = Settings::new(""); + if let Some(info) = parse_pdb_info(view) { - let pdb_info = pdb.pdb_information()?; + let pdb_info = &pdb.pdb_information()?; if info.guid.as_slice() != pdb_info.guid.as_ref() { if check_guid { return Err(anyhow!("PDB GUID does not match")); } else { - let ask = Settings::new("").get_string( + let ask = settings.get_string( "pdb.features.loadMismatchedPDB", Some(view), None, @@ -406,7 +408,7 @@ impl PDBParser { } } - if did_download && Settings::new("").get_bool("pdb.files.localStoreCache", None, None) { + if did_download && settings.get_bool("pdb.files.localStoreCache", None, None) { match active_local_cache(Some(view)) { Ok(cache) => { let mut cab_path = PathBuf::from(&cache); @@ -485,7 +487,7 @@ impl PDBParser { if check_guid { return Err(anyhow!("File not compiled with PDB information")); } else { - let ask = Settings::new("").get_string( + let ask = settings.get_string( "pdb.features.loadMismatchedPDB", Some(view), None, |
