-
-
Notifications
You must be signed in to change notification settings - Fork 408
NewFiles API integration. #19029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Pharo14
Are you sure you want to change the base?
NewFiles API integration. #19029
Conversation
|
Thanks Ronie! |
|
@Ducasse I do not have the benchmarks in Pharo yet. However, I do have the benchmarks in C at https://github.com/ronsaldo/fs-benchmarks I have benchmark data in C for Windows, Linux and OS X at https://github.com/ronsaldo/fs-benchmarks/tree/main/benchs .
|
|
This new implementation is supposed to replace the File class? |
|
Hello, @jecisc This implementation adds a NewFilePlugin without touching the existent FilePlugin. In fact, to provide backward/forward compatibility I am calling the primitives in the File class from a new OldFile class. For using the NewFile class, the VM has to be compiled with the NewFilePlugin. To choose between them (OldFile and NewFile) I added the FileAPI and DirectoryAPI which selects the new file class if NewFilePlugin primitiveIsAvailable returns true. If the primitive does not return true, then the OldFile will be selected. @Ducasse Benchmarks can be run by using the following script: FileAPIBenchmarks runWithFileAPI: OldFile.
FileAPIBenchmarks runWithFileAPI: NewFile.Here are the results for Windows: OldFile Benchmarks NewFile Benchmarks |
|
Thanks ronie I imagine that Pablo is following this. @tesonep |
|
@ronsaldo do you have some bench on windows? |
|
I refactored the benchmarks to compute multiple samples so that an average and a std can be obtained. For Linux, these are the benchmarks results that I am obtaining: OldFile Benchmarks NewFile Benchmarks |
|
Here are some results on Windows: OldFile Benchmarks NewFile Benchmarks I am getting zero in some time measurements. These results seem to suffer from an inaccurate microseconds clock. |
|
Ok always thought that windows file got a problem but if your implementation is better it looks like the window primitives |
New file API initial version for review and integration. This is the same code in https://github.com/ronsaldo/pharo-newfile