Opened 9 years ago

Closed 9 years ago

#9517 closed Patch - Bug Fix (Won't Fix)

Possible scheduler performance enhancement

Reported by: Doug Haber <doug@…> Owned by: gigem
Priority: minor Milestone: unknown
Component: MythTV - Scheduling Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I noticed that one of the queries in the scheduler was taking ~15 seconds for me and when I removed p.description it dropped down to ~1 second. I don't think that this particular description is actually used anywhere so changing it to "" increased my performance with no scheduling side effects (yet - I've only tested this for a few hours). Since all of my descriptions are < 255 another fix might be left(p.description, 255) or something similar.

See attached patch.

Thanks! D

Attachments (1)

sched.patch (873 bytes) - added by Doug Haber <doug@…> 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Doug Haber <doug@…>

Attachment: sched.patch added

comment:1 Changed 9 years ago by Doug Haber <doug@…>

I did some testing last night and I was able to get almost the same performance increase by using:

left(p.description, 16000)

In this way no data is lost and users still get a performance boost.

-Doug

comment:2 Changed 9 years ago by gigem

Resolution: Won't Fix
Status: newclosed

The description is used to check if two programs are the same when programids aren't available and It's also displayed to the user on the Upcoming Recordings screen, so removing it is incorrect. I do see a tiny speedup in my scheduler runs when using left(p.description, 16000), but my scheduler runs are short enough that the change is insignificant. Anyway, until someone can explain *why* this change makes a difference, I'm not inclined to apply it. The column length is already defined in the database schema, so I don't like programatically limiting it, even to the same length, in one single code path.

Note: See TracTickets for help on using tickets.