Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed as not planned
Description
Feature or enhancement
Proposal:
When normalising a relative path, we don't need to process the cwd as it's already normalised, which could get expensive if it's long:
< _Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t *normsize)---> _Py_normpath_and_size(wchar_t *path, Py_ssize_t size, Py_ssize_t start, Py_ssize_t *normsize)2397a2398,2402> return path;> }> // Start beyond end of path> if (start >= size) {> *normsize = size;2457a2463,2467> // Skip past cwd> if (path + start > p1) {> p1 = p2 = path + start;> lastC = *(p1-1);> }2525c2535< return _Py_normpath_and_size(path, size, &norm_length);---> return _Py_normpath_and_size(path, size, 0, &norm_length);
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response