You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By "adjacent" I assume you mean that if the user is looking at comic n, then comics n-1 and n+1 are silently loading in the background. I'm starting to get familiar with the code, and it looks to me like the way to do this would be to keep a few instances of ComicInfo around, instead of just the one. Maybe a map from comic numbers to ComicInfos. Then the getComicInfoFromPage method would just return the value from the map, if it's there. If it's not there, then we follow the current implementation and add it to the map when we're done. Technically, this will only cache the image URL, not the image itself, but I suspect that applying the regexes to the HTML to get the image URL is a large part of the slowness, so it's still probably worth doing.
If I'm not mistaken, this would also have the added bonus of automatically caching the image URL for any of the comics the user has already looked at. I hope I'm not totally misunderstanding your code...
No description provided.
The text was updated successfully, but these errors were encountered: