Skip to content

Commit

Permalink
scale AdvancedILFunction preloading based on worker thread count inst…
Browse files Browse the repository at this point in the history
…ead 5
  • Loading branch information
psifertex authored and xusheng6 committed Nov 30, 2023
1 parent 15ddcf7 commit a3ee4ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/binaryview.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
from . import architecture
from . import filemetadata
from . import lowlevelil
from . import mainthread
from . import mediumlevelil
from . import highlevelil
from . import debuginfo
Expand Down Expand Up @@ -1894,7 +1895,7 @@ class AdvancedILFunctionList:
>>> timeit.timeit(lambda:[f for f in bv.functions], number=1)
0.02230275600004461
"""
def __init__(self, view: 'BinaryView', preload_limit: int = 5, functions: Optional[Iterable] = None):
def __init__(self, view: 'BinaryView', preload_limit: int = mainthread.get_worker_thread_count(), functions: Optional[Iterable] = None):
self._view = view
self._func_queue = deque()
self._preload_limit = preload_limit
Expand Down

0 comments on commit a3ee4ce

Please sign in to comment.