COMBAT_LOG_EVENT_UNFILTERED improvement help
I wonder if that code can be improved. It takes up quite some cpu time. Nothing extremely bad, but COMBAT_LOG_EVENT_UNFILTERED is called very often and mostly at bad times.
Thanks in advance for looking through it. Code:
function addon:COMBAT_LOG_EVENT_UNFILTERED( event, ... ) |
Quote:
You shouldn't be using varargs in your subevents. The number of arguments returned will always be the same. You'll save a tiny bit of time by not having to use the select function. You're using strlower to check for keys in all of your list tables. It's not going to make or break the function speed, but you shouldn't do it unless it improves functionality or readability. I personally don't see any other blatant problems though. I also can't really visualize what you're attempting to do to see if there's an alternative method. |
The tinsert isn't used very often, that's what the filtering is for :).
Is varargs the ... ? I'll try that, thanks. strlower is just for convenience. I could remove that and just tell the user to watch out for proper cases. I'm trying to improve my COMBAT_LOG function, since it uses the vast majority of my addon's CPU time. Maybe there are some tricks or common practices to handle the COMBAT_LOG. |
All times are GMT -6. The time now is 05:33 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI