9/21/2023 0 Comments Ripgrep work stealing queueCan't we get bytes processed estimation from the line iterator? Let's say we won't provide that functionality for multiline. Maybe I'm missing something, but if all files are known in advance, and their sizes are known, wouldn't knowing bytes scanned/total bytes to scan give as a coarse grain evaluation of how much work is left? ![]() That's exactly what I considered in my comment. While this is a nice feature for ripgrep, it's even more essential for libripgrep, where progress might be essential for correctness.Ĭan you unpack this? It isn't clear to me what you mean here, particularly with respect to the phrase "essential for correctness."Ĭan't you descent and search for all relevant files before starting to work, in case user asks for progress bar? That makes this feature quite complex and a maintenance burden for me in particular. Therefore, adding a progress bar would require adding that design in addition to what ripgrep currently does to avoid a performance regression for all searches. It isn't designed that way because that isn't the fastest way to execute a search. Overall, ripgrep just is not designed in a way that makes it easy to accrue all search candidates in advance, and then search them. That also requires a stat call for every single file, which has non-trivial overhead. ![]() ![]() It doesn't just want the number of files, but also the amount of disk space searched. Your progress bar doesn't stop there either. But this is very specifically not ever known, because ripgrep processes files in an incremental fashion as it descends the directories provided to it to search. A progress bar implies some notion of when or after how much work the search will complete. This isn't really a practical thing to do unfortunately.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |