comments
This commit is contained in:
parent
ced91b3fbd
commit
3204f0bbaa
2 changed files with 37 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 4"""
|
||||
date="2021-04-02T16:09:45Z"
|
||||
content="""
|
||||
I benchmarked calls to debugM when no debug output is enabled,
|
||||
and it looks like around 1 million can be made per second
|
||||
on my netbook. So if a 1% slowdown due to debugging is acceptable (which
|
||||
seems a bit above the upper bound to me), that would allow 10 thousand
|
||||
debugM calls per second.
|
||||
|
||||
Current call rate is probably always under 10 per second. Keeping it
|
||||
out of tight loops would probably be sufficient.
|
||||
|
||||
Once place I sometimes wish had debugging is reads from the git-annex
|
||||
branch. But running eg "git-annex get --from foo" in a repository with
|
||||
many thousands of files, none of them in foo, does tends of
|
||||
thousands of reads per second in a tight loop. Benchmarked
|
||||
that command with debugM of reads added, and it was 0.05% slower
|
||||
than without debugM.
|
||||
|
||||
So, to add debugM there, would need to do what comment #3 discussed.
|
||||
"""]]
|
|
@ -0,0 +1,14 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 5"""
|
||||
date="2021-04-02T17:31:57Z"
|
||||
content="""
|
||||
Re comment #3, it occurs to me that currently anything that accesses
|
||||
AnnexState does an MVar access, which will have around the same overhead as
|
||||
a call to debugM. But much more frequently used.
|
||||
|
||||
So, anything in AnnexState that is frequently used and is immutable
|
||||
and could be split out to Reader will avoid that MVar access and be a
|
||||
free performance win. Good reason to split AnnexState, whether or not
|
||||
it's used to speed debugging.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue