-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Description
NARC rules scan for strings in the database but also in the XPI, looking at the manifest and optionally at translations. But since it's working on Version
instances, we already have the manifest in the database by the time we trigger NARC. Which means that for XPIs that don't contain translations, we could bypass opening the XPI entirely and just load the data from FileManifest.manifest_data
. This should be much faster.
In addition, we should add caching to avoid repeating the normalization, homoglyph generation and rule check multiple times on the same string that appears in multiple sources/locales. We still want the individual results, but for a given string it won't change.
This should be mostly transparent, but make running narc query rules much faster
Acceptance Criteria
- NARC version scanning is faster when there are no translations involved
- NARC version scanning is faster when there are translations involved
┆Issue is synchronized with this Jira Task