Jump to content

Aggressive Image Caching in 4.7


roaku
Go to solution Solved by roaku,

Recommended Posts

roaku

I finally updated my main server to 4.7, and I'm seeing some very tenacious app side image caching in multiple apps.

Pre 4.7, once Iconic triggered a change to the image cache key, you would see the image start to regenerate in the apps almost immediately.

Now, the old images are hanging on for much longer, even though the new image has already been created and placed in the server side image cache.

The updated image might show up in the Library view within a few minutes (or not), but the old image might stick around indefinitely in the Latest Movies view before finally updating. I'm also seeing the opposite, where the image in the Library view refuses to update while the same image in Latest Movies is already updated.

Also, an old image can take back over after navigating away from a view and then back again.

So far, of the apps I'm running, the Android app is the worst offender (not even restarting the app helps) while the Roku app updates faster, but still much slower relative to  4.6 and lower.

With the web app, I can at least disable the browser cache to get the image updates right away and verify that Iconic has already done its thing on the images.

If there's anything I can do about this from the plugin side, please let me know, but this is a huge issue for Iconic.

 

Edited by roaku
  • Agree 2
Link to comment
Share on other sites

roaku

Look at The Mothman Prophecies in the Android screenshots below.

Iconic updated the image immediately, but the app side caching is preventing it from showing on every view.

In this case, Latest Movies (left screenshot) updated relatively quickly, but an hour later, the Movie Library view(right screenshot) still has the old image.

In 4.6 and lower, the image updates occurred in real time.

In 4.7, some images still update immediately, but a large number of them get stuck like this.

 

image-caching.png.1e00de6927090627cbfdac2ca34c16c6.png

Edited by roaku
Link to comment
Share on other sites

roaku

To hopefully clarify things a bit, I'm talking about app side caching.

The image API is still updating the server side image cache as soon as Iconic updates the cache key. The apps just aren't retrieving/displaying the updated images quickly/consistently anymore.

 

  • Agree 1
Link to comment
Share on other sites

roaku

Here's another example set of screenshots.

In this case, the Project A movie images still haven't updated on the home page in Latest Movies, even though their new images were generated 10 hours ago and are visible in the Library version of Latest Movies:

image-caching-2.png.9e6b989f922cd8ba7750aaf72f5d8a4c.png

 

Again, the updated images exist on the server side, the apps are just slower to discard the old images and display the new images.

Since this issue occurred with a server update, the root issue might be the server not properly signaling to the apps that their locally cached images are out of date.

Link to comment
Share on other sites

roaku

More speculation here, but after playing around with this on the Android TV app, it feels almost like the first screen displaying the image that you happen to load first triggers the image refresh normally, which causes all subsequent screens you visit to behave like they have the updated image too. They just don't.

Link to comment
Share on other sites

horstepipe

Yes that problem also caught my attention since I‘m using your plug-in, hopefully something can be done there.

Link to comment
Share on other sites

Happy2Play
5 hours ago, Luke said:

@Happy2Play have you seen this with CoverArt?

Not that I can see web client, ET and Roku update images on every treatment change.

Link to comment
Share on other sites

roaku
38 minutes ago, Happy2Play said:

Not that I can see web client, ET and Roku update images on every treatment change.

Can you also check the Android app please? That's the one that's been the worst for me by far.

  • Agree 1
Link to comment
Share on other sites

Happy2Play
3 minutes ago, roaku said:

Can you also check the Android app please? That's the one that's been the worst for me by far.

Sorry I personally don't have any Android devices.

Link to comment
Share on other sites

roaku
14 hours ago, Happy2Play said:

Sorry I personally don't have any Android devices.

@ebr

Would you mind taking a look at the Android mobile app to see if CoverArt treatments are behaving similarly to what I've described in this thread?

Link to comment
Share on other sites

43 minutes ago, roaku said:

@ebr

Would you mind taking a look at the Android mobile app to see if CoverArt treatments are behaving similarly to what I've described in this thread?

I could not reproduce an issue.  I changed the CA treatment and it was immediately reflected both on home screen and in main library.  Even just backing to home screen and re-opening the library reflected changes in the treatment.

Link to comment
Share on other sites

roaku
11 minutes ago, ebr said:

I could not reproduce an issue.  I changed the CA treatment and it was immediately reflected both on home screen and in main library.  Even just backing to home screen and re-opening the library reflected changes in the treatment.

Ok, thanks for checking.

Hmm, then this may be another case of the Item not being consistently populated with its full metadata when it's handed off to my IImageEnhancer implementation in some contexts.

I already have a workaround in place to re-fetch the Item from the library manager when I need to test an Item's extras or tags because those aren't always present.

It looks like some of the new rules I added may need to be added to this workaround.

If that's the case sorry for bothering everybody, and I'll get it fixed. :)

Edited by roaku
  • Thanks 2
Link to comment
Share on other sites

roaku

Ok, I've pushed up a BETA 2.1.2.0 to try re-populating the Item for the new date related rules like I do for Item extras and tags.

Unfortunately, I won't be able to test this myself for awhile beyond the basics of a temporary dev environment I've set up.

So, @horstepipe and anyone else who's experiencing this issue, please try out this beta version and let me know if it:

1) Solves the issue for you for the Date Added and Date Released rules.

2) If so, are there any other rule types you're still seeing the issue with?

Thanks

  • Agree 1
Link to comment
Share on other sites

  • 3 weeks later...
  • Solution
roaku

I was finally able to test Iconic BETA 2.1.2.0 on my main machine and the issues I was seeing appear to be resolved by re-fetching the item to populate the missing metadata before testing the item against the icon rules.

I've graduated 2.1.2.0 to RELEASE in the catalog.

Sorry again for the misdiagnosis.

Edited by roaku
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...