Subject: bug#71398: 30.0.50; Byte-compiling eat 0.9.4 stalls

From: Steven Allen <[email-masked]>
Date: Fri, 07 Jun 2024 08:49:27 -0700

(CC Stefan because this appears to be caused by 16fc5b6c0c72464a75d9a84b754375662b3acec6)

Eli Zaretskii <[email-masked]> writes:
> Thanks, but why do you think this is a bug in Emacs and not in eat?
> Did you report this to the eat developers?  If not, I suggest to do
> that first.

Ah, I should have included that context. This version of EAT used to
compile just fine, I only ran into an issue when I updated to master
yesterday.

On further investigation, this appears to be due to this [1] pcase. It
doesn't actually hang forever, it just gets exponentially slower for
each destructuring pattern with an internal operator like `or` or `and`.
E.g.:

    (`((,(or ?B ?e)) nil ((,n)))
     (eat--t-cur-down n))

I've tracked it down to 16fc5b6c0c72464a75d9a84b754375662b3acec6.
Reverting this commit makes `eat.el` compile instantly.

[1]: https://codeberg.org/akib/emacs-eat/src/commit/3a6f418f55d183b9d86f99c140caed4ba3d44f93/eat.el#L3534