On 12 October 2015 at 10:21, Sebastian Gniazdowski wrote: > With both patches zprof running time is around 1806. RES is 152M and > goes down nicely to 37564 when I quit the script. Didn't observe > after-while slow down. The tool is almost fully usable for 89k > elements (there's still a bit lag), however searching is slow, I > attached zprof results for searching. It is done via two following > invocations: > > list=( "${(@M)list:#(#i)*$~search_pattern*}" ) > col_list=( > "${(@)list//(#mi)($~colsearch_pattern)/$red${MATCH}$reset}" ) > > Maybe they trigger some specific behavior on heap? Did one more memory and performance test for version with both patches and without them. Earlier I just started the script and moved 9 lines, then checked memory. Now I ran search with $search_pattern and $colsearch_pattern set to "s", single leter, then checked memory. RES is 433M and 432M, so it's fine. The patched (HEAD) version is 14 times faster. I also checked 5.0.2 – RES is 400M, and it's ~8 times slower than the patched version. Best regards, Sebastian Gniazdowski