Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Once a comic has been opened, attempting to open another comic shows the previously opened comic. #259

Closed
bareheiny opened this issue May 1, 2020 · 9 comments
Labels
comic Issues related to individual comics. feature A new feature or enhancement to an exisiting feature user interface Issues related to the frontend
Milestone

Comments

@bareheiny
Copy link

I was sure I'd raised this before...but can't find any issues for it.

Anyway, I opened a comic (let's call it "Punisher 001") via "Library \ Comics". Everything is fine - all the images are viewable, as is the metadata.

I return to the "Library \ Comics" section, and attempt to open "Kick Ass 002" (all selections are cleared prior to opening this comic)...the details for "Punisher 001" are shown.

I just noticed it takes a while, but the correct comic is eventually shown - it maybe takes 10 seconds or so. With this in mind, I now know that I have to wait for the newly selected comic to be loaded...but from a user perspective, it's too much delay.

@mcpierce
Copy link
Contributor

mcpierce commented May 1, 2020

I think this was opened before and I closed it. It's your browser caching the contents of that page while also loading the contents of the newly selected comic. There's really not much that can be done about that from the application perspective.

@mcpierce mcpierce added the wontfix This will not be worked on label May 1, 2020
@bareheiny
Copy link
Author

I thought I'd opened this before as well - but I think it was the scraping image not immediately updating last time.

This time it's the actual comic - and all the metadata, not just the cover.

@bareheiny
Copy link
Author

So the issue here isn't so much the caching, it's the time needed for CX to grab all the information about the selected comic.

It also seems to have something to do with file size or page count....a TPB can take upwards of 10 seconds to load (slightly shorter if it's been loaded before), a smaller / older comic (say 30 pages...file size dependent on the age of the comic and such) can load in seconds.

@mcpierce mcpierce added comic Issues related to individual comics. user interface Issues related to the frontend enhancement A pull request containing a a new feature, refactoring, or security improvement.. and removed wontfix This will not be worked on labels May 2, 2020
@mcpierce mcpierce added this to the 0.6 milestone May 2, 2020
@mcpierce
Copy link
Contributor

mcpierce commented May 2, 2020

@bareheiny Well, thinking about this, one thing we could do is to show a loading overlay on the page that's dismissed once the comic's details are retrieved. So, that being said, I guess we can override this behavior with something a little more under our own control.

@bareheiny
Copy link
Author

An overlay would be good - something to indicate to the user that CX is completing the action, so they don't immediately jump to the assumption that something is wrong (as I did).

I've been playing around with this a bit - usually I have my library set to display 100 comics - I dropped it down to 10, and jumping from comic to comic is a lot more responsive as far as meta data goes.

The cover image seems to be the last thing to be updated - is there any way that could be moved up to occur after the metadata is populated, but before all of the pages are loaded into the page tab?

With that in mind, do the pages need to be loaded immediately - could they be loaded if / when the user selects that tab?

@mcpierce
Copy link
Contributor

mcpierce commented May 3, 2020

We could probably make the pages tab lazily load. Though, TBH, I'm planning on replacing that tab entirely. As it stands now, it was written early in the project and I never went back to do a better job of showing the data on it. When I do rework the page I can make it do the lazy load so that it doesn't drag the rest of the performance down with it.

@mcpierce mcpierce modified the milestones: 0.6, 0.7 May 4, 2020
@bareheiny
Copy link
Author

bareheiny commented Jun 6, 2020

Minor update on this:

I opened a 300+ page TBP and waited for it to load. Then went back to the library page and selected another comic (100 pages this time). Watching the CMD window, CX loaded every page of the TPB I'd previously loaded before loading the newly selected comic.

edit: Possibly related to steps 17 onwards, from #207? But I don't recall seeing the CMD window showing much activity, and for sure the comics I'd been playing with had maybe 30 pages.

@mcpierce
Copy link
Contributor

mcpierce commented Jun 6, 2020

@bareheiny Yeah, unfortunately there's no way for the backend to know that the frontend changed pages and is trying to show a different comic now. It can only process the requests given to it, and the frontend has no way of cancelling the request once submitted.

All of the loading you're seeing is due to the Pages tab trying to get all of the pages to display. We could fix that by making the Pages tab load lazily, only showing the pages that it needs when it's displayed. That would be a separate feature, and I've been planning on revamping that tab since it's rather pedestrian currently.

@bareheiny
Copy link
Author

Closing - lazy loading of pages tab has resolved this.

@mcpierce mcpierce added feature A new feature or enhancement to an exisiting feature and removed enhancement A pull request containing a a new feature, refactoring, or security improvement.. labels Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comic Issues related to individual comics. feature A new feature or enhancement to an exisiting feature user interface Issues related to the frontend
Projects
None yet
Development

No branches or pull requests

2 participants