Why does this pattern cause problems for Regexr?

I’ve been working on a YouTube ID parsing regex (because none of the available ones are complete) on RegExr.com and I found a pattern that works great. However, when the page first loads, it ALWAYS throws an error.

Exec Error: The expression took longer than 250ms to execute.

The pattern doesn’t take longer than 250ms though. If I make ANY edit to the pattern (e.g. add a space and then remove it), it runs quickly, and perfectly does what I need it to.

A couple of other weird things occur in the execution reporting though.

  1. The UI says “41 matches (0.0ms)”. O.0ms?!
  2. When I hover that same element, there is a message: “No matches found in 1609 characters”.

So, the pattern is effective, but something about it is really throwing the Regexr execution reporting. Any ideas? Is there something wrong with the pattern itself?

Here is the pattern:

/(?:https?://|//)?(?:www.|m.|music.)?(?:youtube.com|youtu.be){1}(/live/|/v/|/embed/|/watch?v=|/w+?v=|/)([w-]+)??.*/gi

Please see the linked page for the demo to see the functionality I described.