Jarek Kowalski
c8d1b221e2
refactor(repository): added fs.DirectoryIterator (#3365)
* refactor(repository): added fs.DirectoryIterator
This significantly reduces number of small allocations while
taking snapshots of lots of files, which leads to faster snapshots.
```
$ runbench --kopia-exe ~/go/bin/kopia \
--compare-to-exe ~/go/bin/kopia-baseline --min-duration 30s \
./snapshot-linux-parallel-4.sh
DIFF duration: current:5.1 baseline:5.8 change:-13.0 %
DIFF repo_size: current:1081614127.6 baseline:1081615302.8 change:-0.0 %
DIFF num_files: current:60.0 baseline:60.0 change:0%
DIFF avg_heap_objects: current:4802666.0 baseline:4905741.8 change:-2.1 %
DIFF avg_heap_bytes: current:737397275.2 baseline:715263289.6 change:+3.1 %
DIFF avg_ram: current:215.0 baseline:211.5 change:+1.6 %
DIFF max_ram: current:294.8 baseline:311.4 change:-5.3 %
DIFF avg_cpu: current:167.3 baseline:145.3 change:+15.1 %
DIFF max_cpu: current:227.2 baseline:251.0 change:-9.5 %
```
* changed `Next()` API
* mechanical move of the iterator to its own file
* clarified comment
* pr feedback
* mechanical move of all localfs dependencies on os.FileInfo to a separate file
* Update fs/entry.go
Co-authored-by: ashmrtn <3891298+ashmrtn@users.noreply.github.com>
* Update fs/entry_dir_iterator.go
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
* doc: clarified valid results from Next()
---------
Co-authored-by: ashmrtn <3891298+ashmrtn@users.noreply.github.com>
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
2023-10-05 02:45:44 +00:00
..
2023-06-18 13:26:01 -07:00
2022-08-09 06:07:54 +00:00
2023-06-18 13:26:01 -07:00
2023-09-02 18:23:21 -07:00
2021-05-03 10:28:00 -07:00
2023-09-02 18:23:21 -07:00
2021-05-06 20:26:35 -07:00
2021-05-03 10:28:00 -07:00
2023-06-18 13:26:01 -07:00
2022-10-29 01:56:51 +00:00
2022-10-29 01:56:51 +00:00
2022-10-29 01:56:51 +00:00
2022-10-29 01:56:51 +00:00
2022-10-29 01:56:51 +00:00
2022-03-26 14:28:08 +00:00
2022-10-29 01:56:51 +00:00
2021-05-11 22:26:28 -07:00
2021-05-11 22:26:28 -07:00
2022-12-17 16:19:12 +00:00
2021-11-16 06:02:04 -08:00
2023-06-18 13:26:01 -07:00
2021-09-19 18:50:38 -07:00
2021-09-08 18:44:03 -07:00
2022-12-17 16:19:12 +00:00
2023-08-03 17:32:51 -07:00
2021-09-19 18:50:38 -07:00
2022-08-09 06:07:54 +00:00
2023-08-24 09:38:56 -07:00
2022-03-12 23:16:39 -08:00
2023-08-24 09:38:56 -07:00
2023-08-24 09:38:56 -07:00
2021-09-08 18:44:03 -07:00
2022-08-09 06:07:54 +00:00
2022-03-06 14:30:58 -08:00
2022-05-25 14:15:56 +00:00
2021-05-22 05:35:27 -07:00
2023-03-11 06:28:05 -08:00
2022-08-09 06:07:54 +00:00
2022-05-25 14:15:56 +00:00
2022-10-28 11:02:47 -07:00
2021-10-06 08:39:10 -07:00
2022-11-19 18:39:04 +00:00
2021-05-03 10:28:00 -07:00
2022-07-09 18:22:50 -07:00
2022-10-24 19:00:36 -07:00
2021-07-06 21:38:08 -07:00
2021-09-08 18:44:03 -07:00
2022-12-17 16:19:12 +00:00
2023-04-09 01:34:36 +00:00
2022-12-17 16:19:12 +00:00
2022-12-17 16:19:12 +00:00
2021-07-06 21:38:08 -07:00
2021-06-05 08:48:43 -07:00
2022-10-24 19:00:36 -07:00
2023-03-11 06:28:05 -08:00
2022-12-17 16:19:12 +00:00
2022-10-24 19:00:36 -07:00
2021-06-05 08:48:43 -07:00
2023-10-05 02:45:44 +00:00
2021-09-10 17:51:55 -07:00
2023-07-03 16:20:02 -07:00
2023-04-09 01:34:36 +00:00
2023-07-03 16:20:02 -07:00
2023-07-03 16:20:02 -07:00
2021-05-03 10:28:00 -07:00
2021-05-11 22:26:28 -07:00
2023-04-09 01:34:36 +00:00
2021-05-11 22:26:28 -07:00
2021-05-03 10:28:00 -07:00
2022-08-09 06:07:54 +00:00
2023-09-26 18:31:47 -07:00
2021-05-06 20:26:35 -07:00
2022-03-16 00:46:57 -07:00
2023-03-11 06:28:05 -08:00
2023-03-11 06:28:05 -08:00
2023-03-11 06:28:05 -08:00
2023-03-11 06:28:05 -08:00
2022-02-22 22:21:48 -08:00
2023-03-11 06:28:05 -08:00
2023-06-18 13:26:01 -07:00
2023-10-04 19:31:28 -07:00
2023-09-22 10:18:19 -07:00
2022-10-24 19:00:36 -07:00
2023-06-18 13:26:01 -07:00
2022-10-28 11:02:47 -07:00
2023-09-22 10:18:19 -07:00
2023-03-11 06:28:05 -08:00
2022-03-17 22:22:24 -07:00
2022-05-18 01:27:06 -07:00
2022-07-30 14:13:52 -07:00
2022-09-02 18:55:01 -07:00
2023-07-27 14:41:23 -07:00
2021-05-11 21:53:36 -07:00
2023-08-24 09:38:56 -07:00
2023-07-27 14:41:23 -07:00
2023-07-27 14:41:23 -07:00
2021-05-11 21:53:36 -07:00
2023-03-11 06:28:05 -08:00
2023-03-27 16:08:11 -07:00
2023-04-09 01:34:36 +00:00
2023-07-03 16:20:02 -07:00
2023-06-18 13:26:01 -07:00
2023-03-11 06:28:05 -08:00
2023-06-18 13:26:01 -07:00
2022-05-18 01:27:06 -07:00
2022-05-18 01:27:06 -07:00
2023-04-09 01:34:36 +00:00
2023-06-18 13:26:01 -07:00
2023-09-09 13:07:53 -07:00
2022-07-27 16:23:45 -07:00
2022-09-06 04:42:07 +00:00
2022-11-19 18:39:04 +00:00
2022-01-03 18:48:38 -08:00
2023-08-20 17:17:20 -07:00
2022-08-09 06:07:54 +00:00
2022-01-03 18:48:38 -08:00
2022-08-09 06:07:54 +00:00
2022-01-03 18:48:38 -08:00
2022-08-09 06:07:54 +00:00
2022-01-03 18:48:38 -08:00
2023-03-11 06:28:05 -08:00
2023-09-15 12:08:35 -07:00
2022-07-09 18:22:50 -07:00
2022-07-09 18:22:50 -07:00
2022-07-09 18:22:50 -07:00
2022-05-18 01:27:06 -07:00
2023-09-10 19:46:28 -07:00
2023-03-11 06:28:05 -08:00
2021-05-06 20:26:35 -07:00
2021-05-03 10:28:00 -07:00
2021-09-28 15:19:02 -07:00
2023-03-11 06:28:05 -08:00
2023-08-03 17:36:10 +00:00
2022-09-02 10:35:59 -07:00
2021-11-06 10:06:05 -07:00
2023-06-18 13:26:01 -07:00
2023-09-02 18:23:21 -07:00
2022-05-25 01:17:55 +00:00
2022-05-25 14:15:56 +00:00
2022-08-09 06:07:54 +00:00
2023-03-11 06:28:05 -08:00
2022-09-06 04:42:07 +00:00
2022-10-24 19:00:36 -07:00
2023-01-21 07:37:15 -08:00
2022-05-31 13:43:42 -07:00
2022-09-02 10:35:59 -07:00
2021-05-03 10:28:00 -07:00
2022-05-31 13:43:42 -07:00
2023-09-06 19:53:16 -07:00
2023-04-10 23:17:32 -04:00
2023-03-11 06:28:05 -08:00
2021-05-03 10:28:00 -07:00
2021-05-06 20:26:35 -07:00
2021-05-06 20:26:35 -07:00
2021-05-03 10:28:00 -07:00
2023-03-11 06:28:05 -08:00
2023-03-11 06:28:05 -08:00
2023-03-11 06:28:05 -08:00
2023-09-04 19:48:28 -07:00
2023-09-04 19:48:28 -07:00
2023-06-18 13:26:01 -07:00
2023-03-11 06:28:05 -08:00
2023-06-18 13:26:01 -07:00
2023-06-18 13:26:01 -07:00
2021-11-16 06:02:04 -08:00
2023-03-11 06:28:05 -08:00
2022-10-24 19:00:36 -07:00
2021-09-14 19:11:39 -07:00
2023-06-18 13:26:01 -07:00
2023-08-14 21:05:34 -07:00
2023-06-18 13:26:01 -07:00
2023-03-11 06:28:05 -08:00
2023-06-18 13:26:01 -07:00
2023-06-18 13:26:01 -07:00
2023-07-27 14:41:23 -07:00
2023-03-11 06:28:05 -08:00
2023-03-31 14:32:34 -07:00
2023-06-18 13:26:01 -07:00
2021-11-16 06:02:04 -08:00
2023-03-11 06:28:05 -08:00
2023-03-11 06:28:05 -08:00
2022-07-30 14:13:52 -07:00
2023-03-11 06:28:05 -08:00
2023-06-18 13:26:01 -07:00
2023-06-18 13:26:01 -07:00