Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

GetItemInfo call spam every time the character starts moving #156

Closed

Description

@BujuArena

For context, I have 120 buttons visible (keyboard layout plus shift copies so that both can always be visible and work properly when releasing shift before the bind).

Whenever the character starts moving, GetItemInfo is called a ridiculous number of times, causing frame drops. This is Neuron. When I disable Neuron, the issue goes away.

I used FunctionProfiler and eventtrace to figure this out.

Activity

  1. brittyazel commented on Aug 9, 2018

    @brittyazel
    Owner

    Hrm interesting... And only when you are moving? This intrigues me

  2. BujuArena commented on Aug 9, 2018

    @BujuArena
    Author

    It happens whenever I start moving. I see a flood of "GET_ITEM_INFO_RECEIVED" events and GetItemInfo is called too many times. Everything else in my UI runs smoothly except this.

  3. brittyazel commented on Aug 9, 2018

    @brittyazel
    Owner

    Can you link to those two tools you used?

  4. BujuArena commented on Aug 9, 2018

    @BujuArena
    Author

    FunctionProfiler is here; old, but works just fine because it's not really affected by WoW API changes: https://wow.curseforge.com/projects/fprof

    eventtrace is a built-in WoW debugging feature. Just type /eventtrace, then /eventtrace start or /eventtrace stop to start or stop it.

    I wish I had a better function debugging tool that could show what called those heavy functions. I started trying to add that functionality to FunctionProfiler, but never finished.

  5. brittyazel commented on Aug 9, 2018

    @brittyazel
    Owner

    Oh nice, I didn't know about that.

    Question, are you making use of flyout buttons? Second, does the version in the master branch do anything to help? I looked at all our usages of GetItemInfo, and none of them looked suspicious. And I have no idea why it would be only when you are moving.

  6. BujuArena commented on Aug 11, 2018

    @BujuArena
    Author

    It's not when I'm moving. It's when I start moving. It's not continuously while moving. Each time I start moving, a ton of events are dumped, causing some frames to be dropped.

  7. brittyazel commented on Aug 11, 2018

    @brittyazel
    Owner

    Ok I found the main source of this problem was a misfiring PET_JOURNAL_LIST_UPDATE that appears fully broken in the game. This even is firing each and every frame, which is definitely a bug. This doesn't solve 'all' the GetItemInfo issues, but most of those can only be solved by implementing some sort of a wait queue, instead of sledgehammering the game all at once with all of the events

  8. BujuArena commented on Aug 12, 2018

    @BujuArena
    Author

    Nothing seemed to change for me with this issue with the latest version, unfortunately.

    I noticed that every time I start moving, my shaman buff for standing still goes away. Could this have anything to do with that, even though the buff isn't due to an item?

  9. BujuArena commented on Aug 13, 2018

    @BujuArena
    Author

    I deleted all the GetItemInfo calls that are in if checks and the lag went away. Of course, buttons where the item cache doesn't contain the item, such as a Hearthstone macro on a new character, don't appear, but my existing characters' buttons all work nicely and since there's no more spiky lag, this is better for me for now. I can put them back on a new character, set up my bars, and remove them again. It's a hassle, but better than being lagged all the time during normal gameplay.

    Maybe with this clue, this can be fixed by only adding items to the cache only on login and placing/editing a macro.

  10. brittyazel commented on Aug 14, 2018

    @brittyazel
    Owner

    How is it now in the latest release?

  11. BujuArena commented on Aug 14, 2018

    @BujuArena
    Author

    Unfortunately, I still get a flood of GET_ITEM_INFO_RECEIVED every time I start or stop moving and a couple frames are dropped with that version. I don't with my own version, but my version has laggy SPELL_UPDATE_USABLE events with 124 handlers, while your version doesn't lag on the SPELL_UPDATE_USABLE event, with only 12 handlers. It's the flood of GetItemInfo calls lagging instead.

  12. brittyazel commented on Aug 14, 2018

    @brittyazel
    Owner

    Damn, well there's only 1 GetItemInfo call that's left in that file (there's 2 others but they only fire when dragging a spell). I was hoping that by putting the conditional check AFTER the ItemCache check we could avoid the whole GetItemInfo reauest entirely. However it seems lua doesn't check if conditions in sequence, and processes them all regardless. Ugh.

  13. brittyazel commented on Aug 15, 2018

    @brittyazel
    Owner

    Ok I moved the GetItemInfo call to the MACRO_PlaceItem function, thus it will check if the item is in the ItemCache upon placing. This takes it out of the MACRO_UpdateData, and should solve the problem for good. Can you check the latest MASTER and tell me if it fixes it for you?

  14. BujuArena commented on Aug 15, 2018

    @BujuArena
    Author

    No, that didn't work. It's similar to something I was trying earlier today, but after I started to understand the logic of this whole thing, I realized that the only way to fix it is with some pretty major changes involving ensuring the right events are registered by the right types of buttons. I made those changes and it now works beautifully for me. I'm going to submit a pull request with those changes shortly.

  15. BujuArena commented on Aug 15, 2018

    @BujuArena
    Author

    OK, I've submitted #158

  16. BujuArena commented on Aug 15, 2018

    @BujuArena
    Author

    OK, that pull request was merged and this is now fixed. Thanks!

  17. brittyazel commented on Aug 15, 2018

    @brittyazel
    Owner

    I made a few changes to your patch after merging it, notable in the OnShow and OnHide events. The rest was just updating your patch to the changes I had made since you based your branch.

    Can you test my changes to see if they mess you up at all?

    Can you also do me a favor and sort through the remaining register events in the OnShow and OnHide, and add those to the RegisterCorrectEvents. I want to avoid having events registered and unregistered in many separate locations to I can keep track of all this lol

  18. brittyazel commented on Aug 16, 2018

    @brittyazel
    Owner

    As you could see with the piling up issues, u had to revert back. I've saved all of our work on a new branch. Let's work there and get it perfect and then telease it in one go. I jumped the shark and released it way too soon, but, hell, I was excited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions