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-09-02 18:23:21 -07:00
2023-08-20 17:17:20 -07:00
2022-08-09 06:07:54 +00:00
2023-09-02 18:23:21 -07:00
2022-10-28 11:02:47 -07:00
2023-01-21 07:37:15 -08:00
2023-09-09 13:07:53 -07:00
2023-08-24 09:38:56 -07:00
2022-07-30 14:13:52 -07:00
2023-08-24 09:38:56 -07:00
2023-01-21 07:37:15 -08:00
2022-08-09 06:07:54 +00:00
2022-11-19 18:39:04 +00:00
2023-09-24 17:44:50 -07:00
2022-08-09 06:07:54 +00:00
2023-10-05 02:45:44 +00:00
2022-01-23 14:56:35 -08:00
2023-06-18 13:26:01 -07:00
2023-08-21 15:29:13 -07:00
2022-11-19 18:39:04 +00:00
2023-04-11 15:58:20 -04:00
2022-07-29 09:31:17 -07:00
2023-04-13 18:58:16 -07:00
2023-07-27 11:30:40 -07:00
2023-10-05 02:45:44 +00:00
2023-08-19 18:07:43 -07:00
2023-09-02 18:23:21 -07:00
2022-08-09 06:07:54 +00:00
2021-12-13 14:25:10 -08:00
2022-08-09 06:07:54 +00:00
2023-04-14 16:57:57 -07:00
2023-01-21 07:37:15 -08:00
2023-07-11 20:31:24 +00:00
2022-12-05 04:41:42 +00:00
2023-04-13 20:11:36 -07:00
2023-10-05 02:45:44 +00:00
2023-06-18 13:26:01 -07:00
2022-05-16 05:28:57 +00:00
2023-03-31 04:19:14 +00:00
2022-08-09 06:07:54 +00:00
2023-09-02 16:04:36 -07:00
2023-06-18 13:26:01 -07:00
2023-09-09 13:07:53 -07:00
2022-08-09 06:07:54 +00:00
2023-09-02 18:23:21 -07:00
2022-12-17 16:19:12 +00:00
2023-04-14 19:16:10 -07:00
2023-06-18 13:26:01 -07:00
2023-09-12 07:37:41 -07:00
2021-12-13 13:33:15 -08:00
2023-09-22 10:18:19 -07:00
2023-09-11 22:49:36 -07:00
2022-12-01 06:27:52 +00:00
2023-02-09 06:47:36 +00:00
2023-06-18 13:26:01 -07:00
2022-11-19 18:39:04 +00:00
2022-09-14 09:48:02 -07:00
2022-08-09 06:07:54 +00:00
2023-08-20 17:17:20 -07:00
2022-10-28 11:02:47 -07:00
2022-11-19 18:39:04 +00:00
2023-06-18 13:26:01 -07:00
2023-09-02 18:10:18 -07:00
2022-10-24 19:00:36 -07:00
2023-03-12 00:44:28 +00:00
2023-01-21 07:37:15 -08:00
2023-10-05 02:45:44 +00:00
2022-11-19 18:39:04 +00:00
2022-08-09 06:07:54 +00:00