Skip to content

[Dev] Merge script regex can be pathologically slow #33687

@pitrou

Description

@pitrou

Describe the bug, including details regarding any error messages, version, and platform.

This eats 100% CPU for a long time here (several seconds at least):

 ../dev/merge_arrow_pr.sh 33608
ARROW_HOME = /home/antoine/arrow/dev/dev
ORG_NAME = apache
PROJECT_NAME = arrow

=== Pull Request #33608 ===
title	GH-33607: [C++] Support optional additional arguments for inline visit functions
source	js8544/jinshang/additional_args_for_visit_functions
target	master
url	https://api.github.com/repos/apache/arrow/pulls/33608
=== GITHUB 33607 ===
Summary		[C++] Support optional additional arguments for inline visit functions
Assignee	js8544
Components	C++
Status		open
URL		https://github.com/apache/arrow/issues/33607

Proceed with merging pull request #33608? (y/n): y
Author 1: Jin Shang <shangjin1997@gmail.com>
^CTraceback (most recent call last):
  File "/home/antoine/arrow/dev/dev/merge_arrow_pr.py", line 745, in <module>
    cli()
  File "/home/antoine/arrow/dev/dev/merge_arrow_pr.py", line 726, in cli
    pr.merge()
  File "/home/antoine/arrow/dev/dev/merge_arrow_pr.py", line 579, in merge
    body = re.sub(r"<!--(.|\s)*-->", "", self.body)
  File "/home/antoine/mambaforge/envs/pyarrow/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
KeyboardInterrupt

Component(s)

Developer Tools

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions