Skip to content

Commit

Permalink
Add caching to Secure lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafHaalstra committed Jul 5, 2024
1 parent 2765041 commit f4fc920
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dissect/ntfs/secure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io
from typing import BinaryIO, Iterator
from functools import lru_cache
from uuid import UUID

from dissect.util.sid import read_sid
Expand All @@ -25,6 +26,8 @@ def __init__(self, record: MftRecord = None, sds: BinaryIO = None):
self.sds = None
self.sii = None

self.lookup = lru_cache(4096)(self.lookup)

if record:
self.sds = record.open("$SDS")
self.sii = record.index("$SII")
Expand Down

0 comments on commit f4fc920

Please sign in to comment.