python-nginx icon indicating copy to clipboard operation
python-nginx copied to clipboard

When the Nginx configuration file is too large, the loading speed is extremely slow.

Open MonkeyDLufy opened this issue 7 months ago • 0 comments

I've observed that the code uses data[index:] for regular expression matching on each occasion. When dealing with a very large Nginx configuration file, for instance, one with tens of thousands of lines, the loading speed can be significantly slow, sometimes taking several hours to complete. I improved this by optimizing A slice of 1000, which greatly increases the parsing speed. A slice of 1000 is typically adequate to fulfill the parsing requirements.

MonkeyDLufy avatar Jul 23 '24 02:07 MonkeyDLufy