doshidak / showdex

Pokémon Showdown extension that harnesses the power of parabolic calculus to strategically extract your opponents' Elo.
GNU Affero General Public License v3.0
104 stars 18 forks source link

firefox showdown frezzing sometimes on forfeit #126

Closed zukigay closed 1 year ago

zukigay commented 1 year ago

sometimes when i forfeit/end a match the home other tab buttons from within showdown stop working making it so it's impossible to open chat or switch to a different battle. sometimes you can close the match to escape but only sometimes. ps_20230216125455 If you press any of the replay buttons a error message gets placed in the chat log again and most of the time that's all that happens. If you click the resume button in the center of the showdown battle window then it will look like this. ps_20230216125506 and if you press skip to end it will look like this. also if you press the calcdex button before this last state it will work correctly but if you do it here it will just show missingno as the pokemon. ps_20230216125514 This doesn't happen on Firefox without this add-on. This also tends to happen around my 3-5 match.

doshidak commented 1 year ago

Yikes, that's not good :o

Might be something Showdown changed internally while I was gone (or might be a quirk about Firefox, who knows). I'll go ahead and take a look at it soon.

Thanks for taking the screenshots, they'll be very helpful! Also, sorry about the loss(es), I know that shit's frustrating.

(Oh ya, to you & anyone reading, my b for the random MIA. Life hit a harder last month lol. Project isn't dead—we'll be pushing an update soon.)

doshidak commented 1 year ago

Heya! Just sending an update your way (...tho 2 months later rip).

Might have actually found what's causing all this lag & it's in line with you mentioning that it occurs around the 3rd-5th match. Encountered something similar while testing on my end for the upcoming release, but on Chrome! :o

Apparently the Calcdex interface was still running in memory, even after closing the tab w/ the Clear Memory After Tab Closes setting enabled. While they're running, they'll still be reacting to (but ultimately ignoring) battle updates received from the server.

After a few matches, I noticed some slight chugging, but it was mostly tolerable. Once I got to the 5th match, the lag was very noticeable & parts of the Calcdex were filling in seemingly frame-by-frame instead of it being filled in all at once. At one point, Showdown got laggy enough that my mouse clicks started buffering, so it would register the click on a random move or Pokémon once it momentarily stopped lagging. oof

Regardless, I've (hopefully) addressed this issue & will be bundled with the upcoming v1.1.5 release, which will be dropping later today! If after you get the update & the lag persists, feel free to open another issue. (I'll be closing this one once the PR is merged.)

I thank you for your continued patience! c: