This project is archived and is in readonly mode.
reduce usage of Pathname to make things faster
-
Neeraj Singh
- Tag changed from rails3 to patch, rails3
- Assigned user set to José Valim
Attached is code patch.
-
Jason Gignac
I am only curious, but why is pathname slower than the alternative implementation that is in the original commit and that you suggest in your diff here?
-
José Valim
Jason, doing operations in Pathname objects is expensive. If you run some benchmarks, you can see the difference!
-
José Valim
- State changed from new to invalid
Neeraj, in this case it would be better if the method returned a pathname object for both windows and other platforms, for consistency. And your patch breaks that, so I cannot apply it. :(
I think there is no reason to worry with remaining Pathnames in Rails though, the ones that were appearing in profiling and benchmarks were already removed! Thanks!
