Ticket #7855 (closed patch: fixed)
Opened 2 years ago
Last modified 2 years ago
Improve image loading performance
| Reported by: | Jim Stichnoth <stichnot@…> | Owned by: | stuartm |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.23 |
| Component: | MythTV - General | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
This patch gives a small performance boost in drawing screens, especially the Watch Recordings screen, leading to slightly improved responsiveness.
The issue is that certain images may be loaded dozens if not hundreds of times, and even if the image is already in the cache, a stat system call is still performed to see if the original file has changed. These system calls can add up, especially on network file systems.
The new code relaxes the check on the original file so that the check isn't repeated if it was already done within the past 5 seconds.
Attachments
Change History
comment:1 Changed 2 years ago by stuarta
- Owner changed from ijr to stuartm
- Status changed from new to assigned
- Version changed from unknown to head
- Milestone changed from unknown to 0.23
comment:2 Changed 2 years ago by stuartm
- Status changed from assigned to closed
- Resolution set to fixed
(In [23245]) Don't check the modification times on files which have only recently been added to the cache (last 5 seconds). Stating files is expensive and this should speed things up a little in certain scenarios. The way this is currently implemented means that the cache timestamp may be out by as much as 5 seconds and I've not considered the possible ramifications of that yet, but they should be minor. Patch thanks to Jim Stichnoth. Closes #7855
