Ticket #45 (new enhancement)

Opened 20 months ago

Last modified 18 months ago

Consider using repository for page existence checks

Reported by: sheep Owned by: sheep
Priority: Low Milestone:
Component: Hatta Wiki Version: unknown
Keywords: Cc:

Description

Currently Hatta checks page existence by directly looking if the file exists. Even if the file is not tracked by the repository, it's considered existing if the file is there. This was done for efficiency reasons -- checking for page existence is a common action and the repository access may be slow... But it was never actually verified. It may as well happen that checking whether a file is tracked in an already opened repository is actually faster. This has to be tested.

Change History

comment:1 Changed 18 months ago by sheep

File-based existence check

Three tries, 1000000 iterations each, result in seconds.

  • 13.228314876556396
  • 13.181467056274414
  • 13.136298894882202

Repository-based existence check

Three tries, 1000000 iterations each, result in seconds.

  • 46.087460041046143
  • 46.297327041625977
  • 46.148791790008545

So it's 3.5 times slower... furthermore, I can double the speed of the file-based check by not checking for symbolic links, which would make the repo check 7 times slower!

Last edited 18 months ago by sheep (previous) (diff)

comment:2 Changed 18 months ago by sheep

On the other hand, if I don't do the lookup for "tip", I get marvelous speedup!

File

[6.3039121627807617, 6.3666200637817383, 6.327131986618042]

Repo

[1.1299951076507568, 1.1295170783996582, 1.129889965057373]

comment:3 Changed 18 months ago by sheep

  • Priority changed from Normal to Low
Note: See TracTickets for help on using tickets.