Page MenuHomePhabricator

eina_file: speed up listing of directories on Windows
ClosedPublic

Authored by vtorri on May 6 2019, 1:37 PM.

Details

Summary

forbid the creation of short name (legacy of DOS)

Without optimisation

  1. using only Win32 API, just iterating over directories (in micro seconds) : 10 files : 47 1000 files : 270 100000 files : 73227
  2. using eina_file_dir_list() with a callback which does nothing : 10 files : 53 1000 files : 265 100000 files : 69624

usually there is a small overhead for eina API, which is normal

With optimisation

  1. using only Win32 API, just iterating over directories (in micro seconds) : 10 files : 51 1000 files : 256 100000 files : 33345
  2. using eina_file_dir_list() with a callback which does nothing : 10 files : 53 1000 files : 251 100000 files : 33832

speed up with 1000 files and more. Twice faster with 100000 files

Test Plan

benchmark program

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vtorri created this revision.May 6 2019, 1:37 PM
vtorri requested review of this revision.May 6 2019, 1:37 PM
vtorri edited the summary of this revision. (Show Details)May 6 2019, 1:45 PM
raster accepted this revision.May 7 2019, 3:15 AM
This revision is now accepted and ready to land.May 7 2019, 3:15 AM
This revision was automatically updated to reflect the committed changes.