pawk icon indicating copy to clipboard operation
pawk copied to clipboard

auto import is very slow

Open izhengzhixian opened this issue 6 months ago • 0 comments

all_text = '"v1Cd5Yk6x_f2cqrqNV6Iy_1ab34_dfI" + l'
modules = re.findall(r'([\w.]+)+(?=\.\w+)\b', all_text)

When the code contains the above text, it will be executed for several minutes when searching for module. After changing to the following regex, it will be executed very quickly.

all_text = '"v1Cd5Yk6x_f2cqrqNV6Iy_1ab34_dfI" + l'
modules = re.findall(r'(?<!\w)([a-zA-Z_]\w*)\.\w+\b', all_text)

izhengzhixian avatar Jul 06 '25 04:07 izhengzhixian