Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1RC2
-
Fix Version/s: JRuby 1.1.1
-
Component/s: Extensions
-
Labels:None
-
Environment:MacOS
-
Patch Submitted:Yes
-
Number of attachments :
Description
By changing the way native structures are allocated/read/written, you can boost FileStat performance by a good bit - on MacOS 10.4 with java 1.5, by about 300%.
The attached patch is a cut-down quick&dirty hack of some jffi code to use heap-allocated structures instead of native-memory allocated structures for simple cases where that will work ok (e.g. stat(2), fstat(2)).
Its really only a proof-of-concept, and needs cleaning up by someone, but I thought it was worth putting in an issue in case someone has time to look at it.
This looks very promising, for this and for any other structs we might need to work with. And we certainly could use perf improvements for stat.