SC Lag

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
SC lag
Offline
Posts: 1546
By Ophannus 2013-04-05 20:59:16
Link | Quote | Reply
 
http://pastebin.com/DfyUFTYU

Whenever I take any spell/ja/ws action my game hiccups for 1-2s where everything freezes. it's more noticeable in ***like dyna/legion but its starting to bother me. Anyone know what the culprit might be? It's def in the rules section since when I remove all my rules i get no hangups. I posted a page ago but nobody helped me
 Ragnarok.Martel
Offline
Server: Ragnarok
Game: FFXI
Posts: 2894
By Ragnarok.Martel 2013-04-05 22:13:52
Link | Quote | Reply
 
I had the same issue, worse in dynamis and all. Streamlining my rules didn't help, and eventually I ended up buying a new processor. A much better one. Which fixed things quite nicely. <,<;

Any way, the XML.

For starters, you could have autoexec set those subjob variables for you when you change jobs. Instead of making SC check the against all those possibilities EVERY time you do anything. Or have AE fire a trigger spell shortly after changing jobs that runs those rules in your XML. So you can tuck them in an outta the way corner, instead of heading everything.

Alternatively, you could setup a runonce kinda deal. I use this to set my mythic aftermath durations in status timer. Since PLD's are different, but empy and mythic AM share the same buff IDs
Code
<if Advanced='"$RunOnce"=="1"'>
		<!--Mythic Aftermath LVL 1/2/3 durations-->
		<cmd>StatusTimer setduration 270 90</cmd>
		<cmd>StatusTimer setduration 271 120</cmd>
		<cmd>StatusTimer setduration 272 180</cmd>
		<var cmd="set RunOnce 0"/>		
	</if>

Runs this once per XML load on the first action you do. $Runonce needs to be set to 1 as default in your vars section.

Of the two, I'd recommend the autoexec path. It's what I should probably be doing. Even if the runonce only makes it check one rule, it's still and extra you that you don't need parsing on every lil thing.

I'll post this for now, and look over the rest.
 Ragnarok.Sekundes
Offline
Server: Ragnarok
Game: FFXI
user: Sekundes
Posts: 4189
By Ragnarok.Sekundes 2013-04-05 22:51:35
Link | Quote | Reply
 
Can you post your includes too? Just want to test it and have a accurate idea of how the xml is working.
 Bahamut.Ayasha
Offline
Server: Bahamut
Game: FFXI
user: Ayasha
Posts: 87
By Bahamut.Ayasha 2013-04-05 22:58:11
Link | Quote | Reply
 
I had this issue and running Windower as administrator cleared it up pretty well. Hope that helps you.
 Ragnarok.Martel
Offline
Server: Ragnarok
Game: FFXI
Posts: 2894
By Ragnarok.Martel 2013-04-05 23:20:15
Link | Quote | Reply
 
The section for trigger spells.
Code
 <!--- Trigger Spells --->
<if spell="$TriggerSetOne|$TriggerSetTwo|$TriggerSetThree">
	<if spell="$TriggerSetOne">
		<!--- Auto Update Gear --->
		<if spell="Dancing Chains">
			<cancelspell />
			<if status="idle">
				<equip set="%Status|$Armor-%Status" />
			</if>
			<elseif status="engaged">
				<if advanced='"$VAR-TP"="PDT"'>
					<equip set="TP-$VAR-TP|$Armor-%Status" />
				</if>
				<else>
					<equip set="TP-$VAR-TP|$Armor-%Status" />
				</else>
			</elseif>
			<elseif status="engaged">
				<equip set="%Status|$TwilightSet" />
			</elseif>
		</if>
	</if> 
</if>

You have a section for trigger sets, then another subsection for triggersetone, then one trigger in the whole thing.And both of those rules are variables, so it has to check your single trigger against everything on that variable list. and then again for trigger one alone.
Code
<if spell="Dancing Chains">
	<cancelspell />
	<if status="idle">
		<equip set="%Status|$Armor-%Status" />
	</if>
	<elseif status="engaged">
		<if advanced='"$VAR-TP"="PDT"'>
			<equip set="TP-$VAR-TP|$Armor-%Status" />
		</if>
		<else>
			<equip set="TP-$VAR-TP|$Armor-%Status" />
		</else>
	</elseif>
	<elseif status="engaged">
		<equip set="%Status|$TwilightSet" />
	</elseif>
</if>

Could trim it down like this, and reduce the number of redundant checks.

Also, you see where you have <elseif status="engaged"> and then another one after it? That second one will never parse as true. It's impossible. For an else if to be true, the rule above it must be false, then the rule in it must be true. So if status is not engaged, that rule would be false, and if status is engaged, it'd never even get checked.

I'd fix it, but honestly I dunno what it's supposed to do in the first place.

There doesn't seem to be a return anywhere in the trigger rules. so even though you don't need to parse anything else after completing the trigger rules, it parse the whole rest of the XML.

The dancing chains trigger seems to be returning as true on the ws rules and trying to equip the ws base gear on all your trigger spells. Did this work before? Or is there something in those include that prevents this?

Anyway, I'd suggest a <return/> inside the trigger rule at the very end.

Next up, ws section.
Code
<if type="WeaponSkill">
		<castdelay delay="0.03" />
		<midcastdelay delay="0.7" />
		<if Spell="Camlann's Torment|Drakesbane|Geirskogul|Wheeling Thrust|Sonic Thrust|Penta Thrust|Raiden Thrust|Full Swing|Stardiver|Cataclysm||Shattersoul|Retribution|Geirskogul">
			<castdelay delay="0.03" />                
			<equip set="%Spell" />
		</if>
		<else>
			<equip set="WS Base" />
		</else>
		<if SubJob="SAM|NIN|WAR|THF|DNC" notBuffactive="Spirit Surge" PetIsValid="True">
			<if NotBuffactive="Embrava|March">
				<aftercastdelay delay="1.8"/>
				<equip when="Midcast" Set="TP-Haste">
					<head>Wyrm Armet +2</head>
					<neck>Lancer's Torque</neck>
					<lear>Dragoon's Earring</lear>
					<waist>Glassblower's Belt</waist>
				</equip>
			</if>
		</if>
	</if>

You have the same cast delay set twice. Once for ws globally, then again for polearm/staff ws. Next, you have geirskogul in that list twice. And there's a pair of || with nothing inside it. <,<
 Ragnarok.Martel
Offline
Server: Ragnarok
Game: FFXI
Posts: 2894
By Ragnarok.Martel 2013-04-05 23:50:02
Link | Quote | Reply
 
Ophannus said: »
http://pastebin.com/DfyUFTYU

Whenever I take any spell/ja/ws action my game hiccups for 1-2s where everything freezes. it's more noticeable in ***like dyna/legion but its starting to bother me. Anyone know what the culprit might be? It's def in the rules section since when I remove all my rules i get no hangups. I posted a page ago but nobody helped me
Actually, the way you have your sets put together could have a lot to do with it. But without any rules calling on those sets, they of course wouldn't lag you.

I suggest you read this and the several following posts. It's fascinating
Offline
Posts: 1546
By Ophannus 2013-04-06 13:51:27
Link | Quote | Reply
 
It's Yugl's XML that I just put my own gear sets in, so I don't know what half of it does anyway.
Offline
Posts: 1546
By Ophannus 2013-04-06 13:53:31
Link | Quote | Reply
 
Here is my include, I don't know what a return is but I think its in here. I really don't know much about xmls :/

http://pastebin.com/S6r0pmR9
Offline
Posts: 1546
By Ophannus 2013-04-06 14:12:24
Link | Quote | Reply
 
Update:

Rewriting the dancing chains helped a bit. When I first made the change it eliminated 90% of the lag but then when I go to Adoulin seems like it still lags a bit. Would the group/subjob thing help at all really?


Reduced it down to:
<if spell="Dancing Chains">
<cancelspell />
<if status="idle">
<equip set="Idle" />
</if>
<if status="engaged">

<equip set="TP-Haste" />
</if>



Originally it was for checking various triggers for PDT/Hybrid/Drakesbane-DEX/Drakesbane-Att and various ACC/hybrid sets or whatever. Also had a trigger for locking in Twilight gear into my sets when HP<30% or when I had doom/weakness on, which is what Twilightset was for but I found it was superfluous and rarely ever used so I got rid of em. I can just do it manually I guess.
 Carbuncle.Nezea
Offline
Server: Carbuncle
Game: FFXI
user: Nezea
Posts: 88
By Carbuncle.Nezea 2013-04-06 17:21:16
Link | Quote | Reply
 
I've been having this problem too, but only in certain areas like Salvage and Dynamis. It's extremely annoying. Does simplifying your rules really help all that much? Since it only occurs in certain areas I have to wonder whether "overcomplicated" rules are really the problem here (not to mention, my rules are not at all complicated to begin with).
 Ragnarok.Martel
Offline
Server: Ragnarok
Game: FFXI
Posts: 2894
By Ragnarok.Martel 2013-04-06 18:53:00
Link | Quote | Reply
 
A return(looks like this, <return/>) tells the xml that it's done, and it stops parsing the rest of the xml.It can be used to prevent later rules from interfering with current processes, or just when you there's no need to parse the rest and cause extra lag.

Again, I'd suggest putting a return at the bottom of the dancing chains rule. No need to parse the rest of the xml once that section is done, when using dancing chains.

As for whether removing/adjusting the subjob rules would help. Well, if rewriting dancing chains helped, there's a good chance this would as well. The sub rules get parsed for EVERYTHING even though sub job is a fairly constant var. It doesn't change frequently or mid fight(cept maybe raja/prov? not that that makes much diff)

The dancing chains rule had 2 extra rules, with 4 variables that had to be checked against. But at least they were nested. If you weren't casting DC, you only had to check the first rule, 3 variables.

The subjob rules have 3 rules. Each with 2 attributes. Sub has to be checked against the list, then an advanced rule compares a var. Advanced rules are heavier than normal rules, lag wise(refer to the posts I linked.)It has to check all of this, for ANYTHING and EVERTHING you do. Although, when you're /sam it just has to check that rule then just check elseif..? above rule false? no? skip. for the next two. But that's still extra checks.

So yes, I suspect removing/changing them could help.
Offline
Posts: 1546
By Ophannus 2013-04-07 00:58:16
Link | Quote | Reply
 
So I simplified it to this. Is this the correct position for the /return?


Quote:
if spell="Dancing Chains">
<cancelspell />
<if status="Idle">
<equip set="Idle" />
</if>
<if status="engaged">

<equip set="TP-Haste" />
</if>
</if>
</return>

Something like this?


i just plop a <return/>) there without the parenthesis?
 Ragnarok.Martel
Offline
Server: Ragnarok
Game: FFXI
Posts: 2894
By Ragnarok.Martel 2013-04-07 01:13:46
Link | Quote | Reply
 
The return needs to go inside the dancing chains rule. And the slash in a return goes on the right side.
Code
<if spell="Dancing Chains">
	<cancelspell />
	<if status="Idle">
		<equip set="Idle" />
	</if>
	<elseif status="engaged">
		<equip set="TP-Haste" />
	</elseif>
	<return/>
</if>

If the return were outside the DC rule, nothing below it would ever get parsed. This way, IF you're using DC then you hit the return, and stop parsing. But if you're not using DC, then it keeps going.

btw, if you'd like to maintain the horizontal spacing shown here, you can quote my post the copy it outta there. then the spacing stays when you paste.

Are you using notepad++ to edit your XMLs? The color coding and syntax highlighting are amazingly useful
Offline
Posts: 1546
By Ophannus 2013-04-07 01:22:18
Link | Quote | Reply
 
I'll look into notepad++

Thanks for your help Martel!
 Carbuncle.Nezea
Offline
Server: Carbuncle
Game: FFXI
user: Nezea
Posts: 88
By Carbuncle.Nezea 2013-04-11 18:03:06
Link | Quote | Reply
 
@Ophannus:

As I mentioned previously, I was having the exact same problem as you, but I just found the following solution that fixed everything for me completely. So in case you're still having any issues after following Martel's suggestions, you can try this:

A friend of mine suggested that the lag might be caused by sending commands through the game instead of directly through Windower. So instead of directly executing commands via macros, I tried putting the commands into a script and getting my macros to execute the script. For instance, instead of having a macro with /ma "Cure III" <stpc>, I made a script with this command and called it Cure3.txt, then in my macro put /con exec Cure3.txt. I haven't experienced any freezing since trying this.

I hope this helps.