Difference between revisions of "Talk:Minimizing your Script"
Jump to navigation
Jump to search
→Uncertainty: pontificatory reply
imported>Cbh |
imported>Cbh (→Uncertainty: pontificatory reply) |
||
Line 23: | Line 23: | ||
I'm not sure this article is a very good idea. The advice seems heavy-handed for the effect - it is '''very''' rare for scripts to have any performance issues at all. "Avoid a GameMode block at all costs"? No. In fact, there are a number of reasons to use a GameMode block even when another block would work - OnEquip comes to mind ''immediately'' as an excellent situation where using a GameMode block with a conditional is '''much''' better than using the specific block (since OnEquip does not work for items that are equipped with EquipItem). Giving this kind of advice without much better advice on ''why'' you should or shouldn't do certain things strikes me as unwise. It's only going to confuse people, like Cbh up there.<br /> | I'm not sure this article is a very good idea. The advice seems heavy-handed for the effect - it is '''very''' rare for scripts to have any performance issues at all. "Avoid a GameMode block at all costs"? No. In fact, there are a number of reasons to use a GameMode block even when another block would work - OnEquip comes to mind ''immediately'' as an excellent situation where using a GameMode block with a conditional is '''much''' better than using the specific block (since OnEquip does not work for items that are equipped with EquipItem). Giving this kind of advice without much better advice on ''why'' you should or shouldn't do certain things strikes me as unwise. It's only going to confuse people, like Cbh up there.<br /> | ||
[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 19:53, 7 May 2009 (EDT) | [[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 19:53, 7 May 2009 (EDT) | ||
:I've just been pondering this, and was wondering if anybody feels like attacking the article? I took the recommendations to "avoid using gamemode whenever possible" and about early returns giving "dramatic performance gains" to heart and have subsequently been tripped up by both of them more than once; arguably one instance could have been avoided by checking the documentation (though given the potential for making erroneous but not unreasonable assumptions about what "return" does, I think that such advice should be offered more cautiously: or at least with a better explanation of the consequences) but I do have to wonder if the performance gains are really dramatic enough to encourage the adoption a coding style that's contrary to good programming practice, being a definite risk factor for mistakes and consequent bugs... However, as someone who is still not a particularly experienced TES scripter, I barely feel it's my place to comment let alone amend the article, so I'll leave that to someone else! But I do have fairly serious concerns about the appropriateness of such recommendations, or at least the strength with which they're asserted. --[[User:Cbh|cbh]] 11:06, 14 May 2009 (EDT) |