Store ZipFile entries in dictionary for faster lookup
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu từ TODO trong src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs, khoảng dòng 765, và theo dõi cách FindEntry sử dụng entries_. Xem xét cách lập chỉ mục số hiện có hoạt động. Công việc được hoàn thành khi việc tra cứu nhanh hơn đối với các archive lớn, hỗ trợ một bộ so sánh chuỗi được cung cấp và giữ nguyên lập chỉ mục số.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Steps to reproduce
- Create ZipFile instance
- Access ZipEntry using FindEntry
- Entry is found slowly for large archives and only if name matches verbatim with no option to override string comparison
Expected behavior
Enhancement- ZipEntry is found in a short amount of time and can match using a custom string comparison.
Address the TODO found in ZipFile.cs:765, by storing ZipEntry's in "entries_" variable as a Dictionary<string, ZipEntry> with the ZipEntry.Name as the key to speed up search and indexing at cost of a little more memory usage.
Existing numerical indexing can remain by way of ElementAt LINQ extension or maintaining a separate list of the keys.
Upon creation of the "entries_" dictionary, provide option for IEqualityComparer to allow for non-standard string comparisons when finding entries, as in the case of normalizing path delimiters between file systems.
Actual behavior
It's found but only matches the name verbatim and is really slow in large archives.
Version of SharpZipLib v1.3.1
Obtained from
- Package installed using NuGet
- Ngôn ngữ chính
- C#
- Star
- 3.9k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/SharpZipLib
-
*no response* bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
icsharpcode/SharpZipLib#905 · 1 bình luận ·
-
bug bzip2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
icsharpcode/SharpZipLib#904 ·
-
SetLevel in ZipFile Đang mởenhancement zip
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/SharpZipLib#903 ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
icsharpcode/SharpZipLib#901 · 1 bình luận ·
-
*no response* bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
icsharpcode/SharpZipLib#894 · 1 bình luận ·
Tất cả issue của icsharpcode/SharpZipLib
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1425 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cake-build/cake#5024 ·
-
Gå gjennom ESLint-suppressions Đang mởFrontend status/draft TechnicalDebt
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 75/100
Altinn/altinn-auth#4143 ·