trigger speed/usage of resources

General discussion about the Genesis Web Client located at https://www.genesismud.org/play/

Moderator: Eowul

Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Post Reply
User avatar
Alisa
Hero
Posts: 392
Joined: 16 Nov 2014 23:10

trigger speed/usage of resources

Post by Alisa » 21 Nov 2015 13:01

Hi.

What is fastest, and what uses less resources?


A trigger with (1|2|3etc.etc) listing as example all imbues or herbs or whatever
VS
A trigger using a variable?, stored setting in gmcp.user.something with the same entries

User avatar
britanica
Wizard
Posts: 45
Joined: 28 Sep 2015 16:42

Re: trigger speed/usage of resources

Post by britanica » 22 Nov 2015 01:54

It is my current understanding that the gwc.userdata object is serialized and sent the the server every time you issue a command.

If that assumption is true, it is faster for game play to declare a var in the javascript trigger instead of initializing and storing that information in gwc.userdata as a computer can create a object faster from its declaration in the script than it can when the information needs to be streamed from the server and deserialized.

Initializing the information in your own global variable (outside of the gwc object) would be faster if you can create it after login.

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/