next.js
77f25b95 - optimize read matches to reduce FileSystemPath calls (#75164)

Commit
361 days ago
optimize read matches to reduce FileSystemPath calls (#75164) ### What? `read_matches` is called for every request that need to be resolved. It used to call `FileSystemPath::try_join` and `FileSystemPath::get_type` for every possible! match. This caused a lot of tasks being created. This PR changes the logic to only call `FileSystemPath::read_dir` for the parent directory and looking up the information from that result. This reduces the tasks to the number of directories (instead of the number of possible matching files)
Author
Parents
Loading