Performance Improvements - Multiprocessing, local cache DB, bug fixes and more.. #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Hey! 👋
This PR adds some performance improvements to help BOFHound handle larger AD environments more efficiently, some "resume" functionality and bug fixes.
I've made it using AI, during a red team engagement. I am dealing with a huge domain (millions of objects) therefore this was needed.
What's New
Parallel ACL Processing
ACL parsing now uses multiple CPU cores instead of running single-threaded. On a test dataset, this reduced ACL processing time from hours to minutes.
Before: Single python.exe process maxing one core
After: Multiple worker processes utilizing available cores
Local Cache for Faster Updates
BOFHound now saves processed data to a local SQLite cache (
bofhound_cache.db). On the next run, it remembers what was already done and only processes new/changed objects.What gets cached:
On subsequent runs: Only new objects get parsed and their ACLs computed. Cached objects are skipped entirely.
Use cases:
--context-from domain1_output/to reuse domain1's SID mappings without recomputing them.Using

--context-fromflag:Better Visibility
New progress indicators show what's happening during long runs:
New CLI Options
Bug Fixes
cacertificateattribute)These were discovered when testing against real-world AD data that contained edge cases not present in lab environments.
Disclaimer
I was in the same spot as in #39, so I jumped in to make it easier.
I ran numerous tests and fixed the bugs I encountered, but this is still not bulletproof or perfect. Built with a vibe coding. It noticeably improves performance and QoL for me, and I hope it will help you too.