TheStonedTurtle / party-panel

A RuneLite plugin that displays information about your party members in a custom side panel
BSD 2-Clause "Simplified" License
4 stars 8 forks source link

Gear Seems to lag #17

Closed AlexGellert closed 2 years ago

AlexGellert commented 2 years ago

Hey I noticed the Gear doesn't always update unless people leave and rejoin the party. Can you add a refresh button that will re-grab everyones info hopefully fixing this issue.

I was going to create a PR myself but I can't seem to get your plugin to load in my runelite environment. (relatively new to runelite development)

TheStonedTurtle commented 2 years ago

This is most likely an issue that was introduced in f9df7ec22be557a9bef4c64221eda42596865b6a.

Is it just the gear that doesn't always update or is it other tabs as well? Have you found any way to replicate the issue?

I'd like to avoid adding a refresh button as it would transmit a lot of data at once and the RL team wants us to minimize the data we transfer since they pay for the server that transmits it between clients.

AlexGellert commented 2 years ago

Steps to reproduce:

  1. login to a runescape account
  2. login a second one
  3. Have both join the party
  4. change the inventory of one account

workaround: flipping through the other tabs (inventory, stats, prayer) refreshes inventory.

You could implement something like a debouncer so you aren't constantly spamming the API. Have it to be triggered once a minute if a change happens or add a refresh button with a lock that can be triggered once every 5 minutes manually.

If went with the refresh button you could also save more calls if just had it per person. only certain people in a raid are checked for gear usually.

edit: Everything else is updating instantly but the equipment. Tested stats, prayer, currently equipped. All that looks fine just inventory seems broken. I'd slap a debounce on all of it tbh saves calls they dont need instant feedback aside from specs if worried about that.

TheStonedTurtle commented 2 years ago

I believe I fixed in this 61eeeeb7c2fd70ebc57639a1ef38f810f8df0aca, it seems like the issue was that on the initial expansion of a user their inventory would never update unless you switched to a new tab and then back to it.

If you run into this again after v3.0.3 let me know