What defines a "lightweight" addon
Recently I've been going through and making my UI as "lightweight" as possible. I started off primarily focusing on memory usage (not really a good thing to judge lightweightness by) and gradually shifted to taking CPU usage into account.
I've seen pretty amazing results in terms of playability inside raids (moderate FPS increases and noticeably less interface lag), but a nagging question keeps popping up in my head. I've looked at tons of mods that state they are lightweight in their description and most are (some more than others). The ones I've noticed that used the least amount of resources are the ones that are configured through lua instead of an ingame config, but now that my UI is what I deem "lightweight" I've sort of lost a guide to measure what is actually efficient or not. So I've got two questions: #1: How much memory usage is to much? I've set my view distance up higher in the config file before and noticed the game crashing due to out of memory errors, obviously due to the game having to render more terrain than normal (I'm assuming). At what addon memory usage level does game stability start becoming an issue? Currently my normal UI is using ~780kb of memory and I'm sitting right around 3MB while in raids. Obviously my memory usage isn't an issue but I'd like to hear what some authors think is "too high". #2: What exactly is CPU usage telling us and what is the number of CPU/sec used per addon that starts to get into the realm of inefficiency? As a reference, typically speaking sitting idle (not the best judge either), my highest usage addon is using ~0.16 CPU/sec with my total UI using ~0.7 CPU/sec (0.15 of that is option house totrack the data). What are some of the values that some of the notoriously inefficient addons giving? |
Quote:
|
A lot of people (guilty myself) tend to judge by memory usage because it's the only thing easily visible ingame. A lot of minimalistic UIs throw functionality overboard and look at memory only, not taking CPU into account. I used to do that but then I started to think a little and now I just balance a good functionality to performance ratio.
Static memory does almost nothing for addons, apart from affecting load times (though this is mostly caused by CPU usage during load as well). |
Quote:
Quote:
CPU Usage kings: 1) Raid frames 2) Action Bar range check 3) Damage meters Can't think of any other addon category that impacts cpu usage, Boss mods/Threat meters maybe. |
As far as I'm concerned, lightweight just means it does the same thing as something else with less memory/CPU usage. Using panel addons as an example, drawing a frame is a pretty simple thing to do. Drawing lots of frames with lots of CreateFrame() calls is still a simple thing and not very intensive on the CPU or memory. However, having a config file to define the parameters of the panels rather than storing all the parameters in memory will result in a more "lightweight" feel and will obviously use less memory.
CPU usage and efficiency are not the same thing. Obviously if you have an addon that is really eating up CPU time it's a problem, but you have to consider what the addon is doing to determine whether or not it's being efficient. Insofar as game stability goes, I haven't run into the issue in awhile, and I don't know if they made any changes for 4.0, but WoW was compiled as a 32-bit application. When it hit 2GBs of total memory usage it crashed right away (total for the game, not my UI). This also seemed to include video card memory usage in some tests we ran. To an extent, though, a lot of it seems to be like a contest at this point. People are just shooting for lower and lower memory footprints. This isn't really a bad thing, competition breeds creativity. And if something can be done with less memory/CPU usage then that seems like a better and more efficient approach to me. |
Quote:
That said, "lightweight" is a buzz word that is going around lately, which every addon wants to be and every user wants for their UI. Much like the "Make it use Ace2!" or "Ace this addon please!" cries a few years ago. Whether or not an addon uses the Ace libraries really has no bearing on it being a good addon or not. Same with the term "lightweight". As long as an addon is coded well, it doesn't matter how much memory it uses. And some addons are just going to be CPU intensive no matter what, due to the functions they are trying to do. |
Personally I'm running an i7 930 processor with 6GB of ram and a GTS250 1GB video card. Performance typically isn't a "huge deal" and if I wanted to turn down some of my video settings, I'm sure I'd see my FPS rise signifigantly as well as reduce any interface lag. I guess my goal was to be able to run most settings at max and still get 60+ FPS in raids. I do have a nice Asus 120hz monitor so I can take advantage of FPS over 60.
Before I made the switch to these lightweight mods I was running in the 30-35 FPS area in ICC25. Now I'm typically in the 45-50 FPS range. I've also notice a pretty significant reduction in interface lag. I guess my main concern was tracking CPU/sec on my addons. Optionhouse has a nice way of tracking it, but I have yet to find any documentation on what that is actually tracking and of what significance the numbers its reporting. |
Quote:
|
Looks like my "definition" of "lightweight" is slightly different from most of the above.
To me, an addon is "lightweight" if it only does one thing and does that one thing well. If an addon tries to do two things, it should be separated into two addons. |
Quote:
|
Right. Everyone has their own definitions and opinions/preferences on what makes an addon "lightweight". :)
|
Quote:
So far I've only seen one person say something about CPU/sec just being a relative gauge to compare one addon against another you are currently using. Is there not a number that is deemed 'to high'? |
It's such a flavour-word, feels like it barely means anything anymore. It's like saying "my goal with this addon was for it to be as efficient as possible". Really? As opposed to what? :P
However, it would be nice to get some sort of context when comparing cpu-measurements. What is 'too much', etc. Or some discussion on best practices, I know there are some available but wouldn't mind skimming through a few more. But I guess it's so tied up in what the addon is trying to do, that it is hard to generalize. For example, is OnUpdate better than Animations, and when? Or when tracking buffs on yourself/others, is it better to use UNIT_AURA, a static OnUpdate-timer or CLEU. Guess this got a bit long-winded. Anyway, my point was that lightweight and the strive for it has very little bearing in the grand scheme of things. Unless you're really crammed for HD-space. |
Definitely a flavour word, since another definition of a "lightweight" addon is an addon that doesn't do things you don't want.
Addon X might store data on some item, such as data A, B and C. Addon Y might store data on the same item, but only store data B and C. And Addon Z might only store data C. If addon Z suits your needs, then you would find X and Y bloated and Z is lightweight. If addon Y suits your needs, then you would find addon Z too simple and addon X too bloated. See where I'm going? |
Quote:
For me personally, a lightweight addon is an addon that does no more than what I wanted, and do it efficiently, even though they may use a lot of static memory. Eg. my Actionator uses a good deal of memory, but it's only loaded on my AHMule, so it doesn't bother me. |
I love people who post their UI and go like "It only takes up 300 Kb! Beat that suckers!".
|
Oh boy, this discussion again.
Quote:
Memory usage is like gear score, something people use to measure their e-peen. Quote:
Minimalism is NOT about memory usage, or CPU usage. Minimalism is a design principle. It has nothing to do with memory or CPU. You can have a minimalist UI that uses 100MB, or a non-minimalist one that uses 10. Quote:
|
In the last 6 months or so, I've started auto-rejecting any addon that has the words "very simple" and/or "lightweight" anywhere in its description. Something in those terms just equates with "feature-free" to me. I know that's not entirely true but for me it's a knee-jerk reaction I guess.
I'll grab one big, complex addon like Carbonite (that does a lot of stuff I find necessary)over the 60+ "very simple" addons it would take to replace even a small part of what it does. |
"Lightweight" can't be without context.
Context in this case are the features. You can only compare addons within the same context ie very similar feature-set. "Lightweight" thrown around unqualified is just another buzzword and false advertising for the most part. That does not however mean that there aren't addons around that do "essentially the same thing" (feature-wise) If you want a specific example look at all the "out of range/mana" action-button coloring addons. In that case it is meaningful as a comparative term: "Addon A" uses less resources (mainly cycles/sec and or increasing memory) than "Addon B" which does the same thing so it can be said to be more lightweight. Does that mean that "Addon B" will be detrimental to gameplay? Probably not, but for someone looking for a specific set of functionalities at the minimum cost it may be a selection criterion when building their custom UI. Minimalism is indeed a totally different concept but I don't see how it entered this conversation, the OP made no mention of minimalism. PS. Just realized looking over the thread that I'm basically looking at the term same way as Gandoch. |
Lightweight for me is checking every line of code, every function or algorithm, to make it use less cpu, especially in repetitive or looped code.
I've always been a fan of minimalism too. |
All times are GMT -6. The time now is 08:24 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI