René Scharfe
3b41fb0cb2
fsck: use oidset instead of oid_array for skipList
...
Change the implementation of the skipList feature to use oidset
instead of oid_array to store SHA-1s for later lookup.
This list is parsed once on startup by fsck, fetch-pack or
receive-pack depending on the *.skipList config in use. I.e. only once
per invocation, but note that for "clone --recurse-submodules" each
submodule will re-parse the list, in addition to the main project, and
it will be re-parsed when checking .gitmodules blobs, see
fb16287719 ("fsck: check skiplist for object in fsck_blob()",
2018-06-27).
Memory usage is a bit higher, but we don't need to keep track of the
sort order anymore. Embed the oidset into struct fsck_options to make
its ownership clear (no hidden sharing) and avoid unnecessary pointer
indirection.
The cumulative impact on performance of this & the preceding change,
using the test setup described in the previous commit:
Test HEAD~2 HEAD~ HEAD
----------------------------------------------------------------------------------------------------------------
1450.3: fsck with 0 skipped bad commits 7.70(7.31+0.38) 7.72(7.33+0.38) +0.3% 7.70(7.30+0.40) +0.0%
1450.5: fsck with 1 skipped bad commits 7.84(7.47+0.37) 7.69(7.32+0.36) -1.9% 7.71(7.29+0.41) -1.7%
1450.7: fsck with 10 skipped bad commits 7.81(7.40+0.40) 7.94(7.57+0.36) +1.7% 7.92(7.55+0.37) +1.4%
1450.9: fsck with 100 skipped bad commits 7.81(7.42+0.38) 7.95(7.53+0.41) +1.8% 7.83(7.42+0.41) +0.3%
1450.11: fsck with 1000 skipped bad commits 7.99(7.62+0.36) 7.90(7.50+0.40) -1.1% 7.86(7.49+0.37) -1.6%
1450.13: fsck with 10000 skipped bad commits 7.98(7.57+0.40) 7.94(7.53+0.40) -0.5% 7.90(7.45+0.44) -1.0%
1450.15: fsck with 100000 skipped bad commits 7.97(7.57+0.39) 8.03(7.67+0.36) +0.8% 7.84(7.43+0.41) -1.6%
1450.17: fsck with 1000000 skipped bad commits 7.72(7.22+0.50) 7.28(7.07+0.20) -5.7% 7.13(6.87+0.25) -7.6%
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-09-12 15:17:46 -07:00
..
2018-03-27 08:45:47 -07:00
2018-09-10 10:41:56 -07:00
2018-08-20 11:33:55 -07:00
2018-08-06 12:30:23 -07:00
2013-02-01 13:53:25 -08:00
2017-01-31 12:18:18 -08:00
2017-02-24 10:48:08 -08:00
2017-01-23 10:56:47 -08:00
2015-05-21 13:03:37 -07:00
2018-02-08 14:20:43 -08:00
2018-09-12 15:17:46 -07:00
2017-01-17 15:19:08 -08:00
2018-08-21 11:28:11 -07:00
2017-03-02 11:40:51 -08:00
2017-03-02 11:40:51 -08:00
2018-08-15 15:08:22 -07:00
2018-08-06 12:30:23 -07:00
2010-08-20 10:53:56 -07:00
2016-05-09 15:44:14 -07:00
2018-08-01 11:07:48 -07:00
2015-05-28 12:38:46 -07:00
2018-05-02 17:03:33 +09:00
2018-03-06 14:54:02 -08:00
2018-05-25 17:16:47 +09:00
2018-06-25 13:22:36 -07:00
2017-04-20 22:05:38 -07:00
2014-02-28 09:55:35 -08:00
2018-06-22 14:26:23 -07:00
2018-04-25 13:28:56 +09:00
2017-11-02 14:51:24 +09:00
2018-08-16 11:17:10 -07:00
2018-05-02 17:03:33 +09:00
2018-08-13 13:48:31 -07:00
2018-05-25 17:16:47 +09:00
2018-05-25 17:16:47 +09:00
2018-05-25 17:16:47 +09:00
2017-12-19 10:00:45 -08:00
2011-03-11 10:59:16 -05:00
2018-06-11 09:41:02 -07:00
2016-07-28 11:25:54 -07:00
2013-11-27 12:16:49 -08:00
2011-07-06 14:26:26 -07:00
2016-06-28 08:20:52 -07:00
2018-05-23 14:38:22 +09:00
2014-01-27 08:34:34 -08:00
2018-06-27 10:29:10 -07:00
2016-07-28 11:25:54 -07:00
2017-12-22 13:10:24 -08:00
2018-08-20 12:41:32 -07:00
2016-10-10 13:52:37 -07:00
2014-09-16 11:11:58 -07:00
2018-05-25 17:16:47 +09:00
2018-05-25 17:16:47 +09:00
2013-09-06 14:49:06 -07:00
2013-02-01 13:53:33 -08:00
2016-10-03 13:22:25 -07:00
2018-05-25 17:16:47 +09:00
2018-02-05 10:30:44 -08:00
2017-12-19 11:17:16 -08:00
2011-07-06 14:26:26 -07:00
2018-05-02 17:03:33 +09:00
2018-05-02 17:03:33 +09:00
2018-05-25 17:16:47 +09:00
2017-02-08 13:30:28 -08:00
2018-05-25 17:16:47 +09:00
2018-05-25 17:16:47 +09:00
2018-04-09 14:15:02 +09:00
2018-02-09 13:10:13 -08:00
2018-05-23 14:38:22 +09:00
2018-05-02 17:03:33 +09:00
2018-08-15 15:08:19 -07:00
2018-04-18 12:49:26 +09:00
2011-07-06 14:26:26 -07:00
2018-06-27 10:29:10 -07:00
2018-06-27 10:29:10 -07:00
2015-10-16 15:27:52 -07:00
2018-07-09 14:15:28 -07:00
2017-01-13 12:23:28 -08:00
2015-10-16 15:27:52 -07:00
2018-05-29 14:51:28 +09:00
2016-06-08 12:04:37 -07:00
2018-04-24 10:55:02 +09:00
2018-05-02 17:03:33 +09:00
2018-06-22 14:26:23 -07:00
2018-05-02 17:03:33 +09:00
2013-02-01 13:53:33 -08:00
2017-02-17 15:57:21 -08:00
2016-06-08 12:04:55 -07:00
2018-08-15 15:08:19 -07:00
2018-04-18 12:49:26 +09:00
2018-05-23 14:38:23 +09:00
2018-05-23 14:38:15 +09:00
2017-03-02 11:40:51 -08:00
2016-05-26 13:17:14 -07:00
2016-06-06 11:14:43 -07:00
2017-11-09 12:28:30 +09:00
2015-10-29 12:10:23 -07:00
2013-04-15 11:08:37 -07:00
2011-07-06 14:26:26 -07:00
2013-09-04 15:02:56 -07:00
2018-08-02 15:30:45 -07:00
2013-02-01 13:53:33 -08:00
2016-10-11 10:04:31 -07:00
2015-10-16 15:27:52 -07:00
2018-04-09 14:15:07 +09:00
2016-06-28 08:20:52 -07:00
2018-05-02 17:03:33 +09:00
2018-06-22 14:26:23 -07:00
2018-08-01 13:37:18 -07:00
2018-05-23 14:38:24 +09:00
2011-07-06 14:26:26 -07:00
2013-07-18 16:23:46 -07:00
2011-07-06 14:26:26 -07:00
2017-07-28 14:41:32 -07:00
2014-10-13 13:35:18 -07:00
2018-05-02 17:03:33 +09:00
2018-05-25 17:16:47 +09:00
2018-05-23 14:38:23 +09:00
2016-06-08 12:04:37 -07:00
2018-08-13 10:44:52 -07:00
2018-05-02 17:03:33 +09:00
2018-08-02 15:30:44 -07:00
2018-05-02 17:03:33 +09:00
2017-11-22 12:24:47 +09:00
2018-05-02 17:03:33 +09:00
2016-08-11 14:35:42 -07:00
2013-02-01 14:12:34 -08:00
2013-02-07 14:41:45 -08:00
2018-06-04 21:39:49 +09:00
2018-08-09 09:17:39 -07:00
2018-04-30 11:12:30 +09:00
2018-05-02 17:03:33 +09:00
2017-08-23 12:17:22 -07:00
2017-06-27 10:35:49 -07:00
2017-11-22 14:11:57 +09:00
2018-05-25 17:16:47 +09:00
2016-06-28 08:36:45 -07:00
2017-08-23 12:17:22 -07:00
2018-07-09 10:55:12 -07:00
2018-05-02 17:03:33 +09:00
2012-03-28 11:18:35 -07:00
2011-09-11 21:52:18 -07:00
2016-06-08 12:04:37 -07:00
2018-05-02 17:03:33 +09:00
2018-04-18 12:49:26 +09:00
2018-05-02 17:03:33 +09:00
2018-05-29 00:28:22 +09:00
2018-05-02 17:03:33 +09:00
2018-05-25 17:16:47 +09:00
2014-10-13 13:35:18 -07:00
2018-03-27 19:09:13 -07:00
2018-06-22 14:26:23 -07:00
2015-10-16 15:27:52 -07:00
2018-06-25 13:22:35 -07:00
2018-06-22 14:26:23 -07:00
2012-10-21 12:17:38 -07:00
2018-08-15 15:08:19 -07:00
2017-04-20 22:05:37 -07:00
2011-07-06 14:26:26 -07:00
2016-08-24 12:31:05 -07:00
2018-08-20 11:33:50 -07:00
2018-05-02 17:03:33 +09:00
2011-07-06 14:26:26 -07:00
2015-10-22 10:16:12 -07:00
2016-05-31 10:17:20 -07:00
2018-05-02 17:03:33 +09:00
2016-07-06 13:06:36 -07:00
2015-05-17 11:24:57 -07:00
2017-01-17 16:10:22 -08:00
2018-05-25 17:16:47 +09:00
2013-08-13 09:01:54 -07:00
2018-08-17 15:18:01 -07:00
2011-07-06 14:26:26 -07:00
2018-06-01 15:06:37 +09:00
2018-06-01 15:06:37 +09:00
2018-05-25 17:16:47 +09:00
2017-08-23 12:17:22 -07:00
2017-05-02 10:58:06 +09:00
2017-02-15 12:54:20 -08:00
2017-02-28 11:34:38 -08:00
2018-06-22 14:26:23 -07:00
2017-02-09 15:14:01 -08:00
2018-08-01 13:37:18 -07:00
2018-06-27 12:17:16 -07:00
2018-04-18 12:49:26 +09:00
2018-05-21 13:23:14 +09:00
2016-11-14 11:23:07 -08:00
2018-05-08 15:59:16 +09:00
2018-03-15 12:37:47 -07:00
2018-05-21 13:23:14 +09:00
2018-06-22 14:26:23 -07:00
2017-02-09 15:14:01 -08:00
2017-08-23 12:17:22 -07:00
2017-04-20 22:05:37 -07:00
2017-05-15 13:04:54 +09:00
2018-06-18 10:18:42 -07:00
2018-06-22 14:26:23 -07:00
2014-04-17 11:14:57 -07:00
2017-07-17 15:11:26 -07:00
2017-12-12 16:49:40 -08:00
2014-04-17 11:14:58 -07:00
2015-04-20 11:05:50 -07:00
2016-05-10 11:15:04 -07:00
2013-01-05 23:41:42 -08:00
2018-08-20 11:33:55 -07:00
2018-05-08 16:19:41 +09:00
2018-02-16 11:22:43 -08:00
2018-05-08 16:19:41 +09:00
2018-03-08 12:36:29 -08:00
2016-07-06 13:06:34 -07:00
2018-08-13 13:25:51 -07:00
2017-12-05 10:20:51 -08:00
2018-02-13 13:39:03 -08:00
2018-07-24 14:50:49 -07:00
2011-11-22 18:16:59 -08:00
2018-06-22 14:26:23 -07:00
2017-01-23 10:56:53 -08:00
2016-11-14 11:23:07 -08:00
2015-10-22 10:16:12 -07:00
2016-02-01 13:07:41 -08:00
2012-08-07 14:30:52 -07:00
2017-12-06 07:32:40 -08:00