From 3204f0bbaa74c6c217dd9971555789fd7c78219f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Apr 2021 13:41:26 -0400 Subject: [PATCH] comments --- ..._03cd162638a9b4f2b7981cee141693f6._comment | 23 +++++++++++++++++++ ..._f27efaef3d9cb8db3de9dd42df252059._comment | 14 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_4_03cd162638a9b4f2b7981cee141693f6._comment create mode 100644 doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_5_f27efaef3d9cb8db3de9dd42df252059._comment diff --git a/doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_4_03cd162638a9b4f2b7981cee141693f6._comment b/doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_4_03cd162638a9b4f2b7981cee141693f6._comment new file mode 100644 index 0000000000..14714794cc --- /dev/null +++ b/doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_4_03cd162638a9b4f2b7981cee141693f6._comment @@ -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. +"""]] diff --git a/doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_5_f27efaef3d9cb8db3de9dd42df252059._comment b/doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_5_f27efaef3d9cb8db3de9dd42df252059._comment new file mode 100644 index 0000000000..0a4619965f --- /dev/null +++ b/doc/todo/--debug-level___40__and__47__or_-c_annex.debug-level__41___+_more_debug_information_from_git-annex/comment_5_f27efaef3d9cb8db3de9dd42df252059._comment @@ -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. +"""]]