Skip to content

High CPU load when playing through long gap between subtitles #14

@rndusr

Description

@rndusr
How To Reproduce
  1. Place point on a subtitle that doesn't have a following subtitle for a few
    minutes.

  2. M-x subed-enable-sync-point-to-player

  3. Let the video play.

  4. After a while (tens of seconds in my case), CPU load on a single core spikes
    to 100%. Eventually, video playback becomes choppy and Emacs takes several
    seconds to respond to user input.

What I Know

The relevant code seems to be in subed-srt--subtitle-id-at-msecs, specifically
in the final (catch 'subtitle-id ...). If I comment that out, the issue goes
away, but I don't understand what's wrong with the code or how to investigate
further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions