Add __slots__ support to JS objects

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: basta, Unassigned)

Tracking

Avenir
x86_64
Windows 7
Points:
---

Details

(Reporter)

Description

5 years ago
As it stands, every variable, identifier, and literal in every JS file in an app gets its own JS object, meaning thousands of objects are allocated for a medium-sized app. For large or extra large apps, that number could be in the millions (or, depending on how much ASM, billions).

I don't think any additional members are assigned at runtime, so we can safely add __slots__. This will dramatically improve memory usage when validating large apps and could conceivably decrease CPU churn by quite a bit as well.
(Reporter)

Comment 1

5 years ago
https://github.com/mozilla/app-validator/commit/5b72803a59eee09bc025ac71205d92c08023edda
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.