testiger2 Posted February 4, 2020 Share Posted February 4, 2020 Hi guys, i ask myself if the number of items added via AddInventoryEventFilter does actually affect performance Lets say i use AddInventoryEventFilter on an ActiveMagicEffect that can end up on a arbitary number of actors.(depending on playstyle), It will utilize both OnItemAdded() and OnItemRemoved() EventsAnd i feed each of these ActiveMagicEffects' eventFilters with a Formlist that contains ca. 300-400 items. Will the sheer amount of filteres eventually be worse performance wise than a simple condition test like this: Event OnItemAdded(Form akBaseItem, int aiCount, ObjectReference akRef, ObjectReference akSource) if akBaseItem as armor if akBaseItem as xxScript ;doStuff endif endif EndEvent Link to comment Share on other sites More sharing options...
foamyesque Posted February 5, 2020 Share Posted February 5, 2020 (edited) I don't know if they have a performance impact as such -- I've never instrumented it despite using some very large filters -- but I *do* know the performance impact's a lot less than having events hit Skyrim's Papyrus engine. Filters stop the event from ever firing at all and are presumably checked at the game engine level, which is lightning fast compared to even the fast Papyrus functions. This is especially relevant if one of the actors is the player, because a player doing a 'take all' or dumping their whole inventory at once can cause, if unfiltered, so many events to fire that the stack starts dumping events, and as soon as *that* occurs all sorts of things that rely on events happening start breaking. Edited February 5, 2020 by foamyesque Link to comment Share on other sites More sharing options...
testiger2 Posted February 7, 2020 Author Share Posted February 7, 2020 Well there is absolutely no doubt that papyrus performs worse than the engine.The question is rather at which point does the engine starts to tremble or in other words how large is a formlist allowed to be to be still considered practical and safe to use in this context. Link to comment Share on other sites More sharing options...
foamyesque Posted February 9, 2020 Share Posted February 9, 2020 Well there is absolutely no doubt that papyrus performs worse than the engine.The question is rather at which point does the engine starts to tremble or in other words how large is a formlist allowed to be to be still considered practical and safe to use in this context. I've had filter lists run into the hundreds of items without issue. I wouldn't worry about it. Link to comment Share on other sites More sharing options...
Recommended Posts