Sorry, misunderstood.
Currently investigating my current performance, using the new debug trace, and seeing that any time I get an item or finish a fight the display in the relay browser is really slow, but the rest of the time the performance isn't too bad. I've had Mafia open most of the day, but have only run 87 turns, 40 automatically, and the rest in the browser. Seems to have got much slower in the last few hours where I've not been playing at all. Currently taking around 10 seconds from getting the data from KoL to sending it to the browser.
For example - pickpocket gets an item (cut out all bar fight.php and charpane.php, fight.php takes over 10 seconds from arriving at mafia to being sent to browser, but charpane takes 0.7 seconds)
Code:
1379362266917: Requesting: [url]http://www.kingdomofloathing.com/fight.php?action=steal[/url]
1379362267219: Retrieved: [url]http://www.kingdomofloathing.com/fight.php?action=steal[/url]
1379362277675: To Browser: HTTP/1.1 200 OK: /fight.php
1379362277793: Requesting: [url]http://www.kingdomofloathing.com/charpane.php[/url]
1379362278497: Retrieved: [url]http://www.kingdomofloathing.com/charpane.php[/url]
1379362279227: To Browser: HTTP/1.1 200 OK: /charpane.php
A pickpocket that fails is much faster: (0.7 seconds)
Code:
1379365269660: Requesting: http://www.kingdomofloathing.com/fight.php?action=steal
1379365269942: Retrieved: http://www.kingdomofloathing.com/fight.php?action=steal
1379365270642: To Browser: HTTP/1.1 200 OK: /fight.php
Then attack doesn't get an item, but ends fight (fight takes 0.07s to get to browser, charpane takes over 10 seconds)
Code:
1379362279539: Requesting: [url]http://www.kingdomofloathing.com/fight.php?action=attack[/url]
1379362279809: Retrieved: [url]http://www.kingdomofloathing.com/fight.php?action=attack[/url]
1379362279878: To Browser: HTTP/1.1 200 OK: /fight.php
1379362280076: Requesting: [url]http://www.kingdomofloathing.com/charpane.php[/url]
1379362280331: Retrieved: [url]http://www.kingdomofloathing.com/charpane.php[/url]
1379362291198: To Browser: HTTP/1.1 200 OK: /charpane.php
Another example, choice displays pretty fast in browser (0.25s), then when I get an item after selecting something, it's slow again, around 10 seconds for choice.php, and then again for charpane.php.
Code:
1379362314366: From Browser: GET /choice.php?forceoption=0 HTTP/1.1
1379362314366: Requesting: [url]http://www.kingdomofloathing.com/choice.php?forceoption=0[/url]
1379362314606: Retrieved: [url]http://www.kingdomofloathing.com/choice.php?forceoption=0[/url]
1379362314856: To Browser: HTTP/1.1 200 OK: /choice.php?forceoption=0
1379362318378: From Browser: POST /choice.php HTTP/1.1
1379362318378: Requesting: [url]http://www.kingdomofloathing.com/choice.php?pwd&whichchoice=793&option=3[/url]
1379362318648: Retrieved: [url]http://www.kingdomofloathing.com/choice.php?pwd&whichchoice=793&option=3[/url]
1379362329618: To Browser: HTTP/1.1 200 OK: /choice.php
1379362329747: Requesting: [url]http://www.kingdomofloathing.com/charpane.php[/url]
1379362330460: Retrieved: [url]http://www.kingdomofloathing.com/charpane.php[/url]
1379362341388: To Browser: HTTP/1.1 200 OK: /charpane.php
Once it's running slowly, really doesn't matter whether you are automating or not. Mana burning on some spellcasting also takes ages, the piece being from getting api request back up to asking for the next skill cast, around 13 seconds each time.
Code:
1379365182190: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=88&quantity=3
1379365182460: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=88&quantity=3
1379365182700: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365182952: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365196190: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=1015&quantity=2
1379365196900: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=1015&quantity=2
1379365197360: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365197610: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365210528: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=2009&specificplayer=2013921&bufftimes=4
1379365211218: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=2009&specificplayer=2013921&bufftimes=4
1379365211658: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365211898: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365225855: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=3010&quantity=2
1379365226565: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=3010&quantity=2
1379365227015: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365227255: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365240817: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=6010&specificplayer=2013921&bufftimes=2
1379365241527: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=6010&specificplayer=2013921&bufftimes=2
1379365241967: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379365242237: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
After a restart, all different.
Successful pickpocket: (0.7 seconds for fight, much faster, 0.7 seconds for charpane, same as before)
Code:
1379366574025: Requesting: http://www.kingdomofloathing.com/fight.php?action=steal
1379366574307: Retrieved: http://www.kingdomofloathing.com/fight.php?action=steal
1379366575037: To Browser: HTTP/1.1 200 OK: /fight.php
1379366575222: Requesting: http://www.kingdomofloathing.com/charpane.php
1379366575469: Retrieved: http://www.kingdomofloathing.com/charpane.php
1379366576199: To Browser: HTTP/1.1 200 OK: /charpane.php
Unsuccessful pickpocket: (0.7 sec - same as before restart)
Code:
1379366166757: Requesting: http://www.kingdomofloathing.com/fight.php?action=steal
1379366167027: Retrieved: http://www.kingdomofloathing.com/fight.php?action=steal
1379366167717: To Browser: HTTP/1.1 200 OK: /fight.php
Winning a fight : (0.4 sec for fight.php, 0.6 for charpane)
Code:
1379366582447: Requesting: http://www.kingdomofloathing.com/fight.php?action=attack
1379366582727: Retrieved: http://www.kingdomofloathing.com/fight.php?action=attack
1379366583167: To Browser: HTTP/1.1 200 OK: /fight.php
1379366583363: Requesting: http://www.kingdomofloathing.com/charpane.php
1379366583639: Retrieved: http://www.kingdomofloathing.com/charpane.php
1379366584019: To Browser: HTTP/1.1 200 OK: /charpane.php
Casting spells, now down to a much more reasonable 0.2 seconds from api.php to next spell request:
Code:
1379366565819: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=1015&quantity=3
1379366566099: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=1015&quantity=3
1379366566559: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366566809: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366567041: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=2009&specificplayer=2013921&bufftimes=4
1379366567311: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=2009&specificplayer=2013921&bufftimes=4
1379366567551: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366567801: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366568033: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=3010&quantity=2
1379366568463: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=3010&quantity=2
1379366568923: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366569183: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366569395: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=88&quantity=2
1379366569665: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=88&quantity=2
1379366569905: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366570155: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366570357: Requesting: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=6007&specificplayer=2013921&bufftimes=4
1379366570837: Retrieved: http://www.kingdomofloathing.com/skills.php?action=Skillz.&whichskill=6007&specificplayer=2013921&bufftimes=4
1379366571287: Requesting: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
1379366571527: Retrieved: http://www.kingdomofloathing.com/api.php?what=status&for=KoLmafia
I think the only really new thing from this is that the performance hit only affects certain pieces of processing, which is more clear with the more accurate timestamps. Some are the same speed for both before and after restart, others are much faster after restart.
The areas that look affected :
Processing fight.php if an item is gained.
Processing charpane.php after a fight.
Processing choice.php if an item is gained.
Processing api.php after casting a spell.
The areas that don't look affected :
Processing fight.php if an item is not gained.
Processing charpane.php after a pickpocket success.
Getting late again, any ideas of next steps welcomed.