tenants
Well-known member
For each addon, it seem just extending the core will increase the memory by about 0.06 MB (even though we can get the calculation of the addon it's self down to below 0.01 MB)
This 0.06 MB might not seem much, but at this point we have done nothing other than add the addon, and this value is arithmetic. The more addons a user has, the more memory will be hogged.
Since a lot of addons can be very memory cheap (and 0 query), is it not worth also keeping the memory down when extending the core classes
A simple test case is this empty thread extension addon (attached)
It does nothing other than
1) Listen to load_class_controller
2) extend the thread (no classes are overridden, no new classes are used)
- It's possibly the smallest addon possible that listens to load_class_controller and extends thread (but then it does do nothing)
Once installed, going to a thread and refreshing a few times, we get a rough steady state of about 2.300 MB (depending on what other addons are present)
Timing: 0.0521 seconds Memory: 2.300 MB DB Queries: 10
Turning the addon off and refreshing a few times, we get a rough steady state of about 2.247 MB (depending on what other addons are present)
Timing: 0.0513 seconds Memory: 2.247 MB DB Queries: 10
Un-installing the addon and refreshing a few times, we get a rough steady state of about 2.247 MB (depending on what other addons are present)
Timing: 0.0647 seconds Memory: 2.247 MB DB Queries: 10
If one addon listening to the load_class_controller adds 0.06 MB, then 25 addons would add about 1.5 Meg, even if they did very little/nothing
In this case, the 25 empty addons increase the memory used by 66% (and that's just addons that do nothing other than extend the thread class with no calculations).
This 0.06 MB might not seem much, but at this point we have done nothing other than add the addon, and this value is arithmetic. The more addons a user has, the more memory will be hogged.
Since a lot of addons can be very memory cheap (and 0 query), is it not worth also keeping the memory down when extending the core classes
A simple test case is this empty thread extension addon (attached)
It does nothing other than
1) Listen to load_class_controller
2) extend the thread (no classes are overridden, no new classes are used)
- It's possibly the smallest addon possible that listens to load_class_controller and extends thread (but then it does do nothing)
Once installed, going to a thread and refreshing a few times, we get a rough steady state of about 2.300 MB (depending on what other addons are present)
Timing: 0.0521 seconds Memory: 2.300 MB DB Queries: 10
Turning the addon off and refreshing a few times, we get a rough steady state of about 2.247 MB (depending on what other addons are present)
Timing: 0.0513 seconds Memory: 2.247 MB DB Queries: 10
Un-installing the addon and refreshing a few times, we get a rough steady state of about 2.247 MB (depending on what other addons are present)
Timing: 0.0647 seconds Memory: 2.247 MB DB Queries: 10
If one addon listening to the load_class_controller adds 0.06 MB, then 25 addons would add about 1.5 Meg, even if they did very little/nothing
In this case, the 25 empty addons increase the memory used by 66% (and that's just addons that do nothing other than extend the thread class with no calculations).
Attachments
Upvote
3