libphonenumber-csharp icon indicating copy to clipboard operation
libphonenumber-csharp copied to clipboard

Zip geocoding data for framework 4.6+

Open dwfrancis opened this issue 3 years ago • 6 comments

Compress geocoding data to reduce dll size to 4608 KB from 14 311 KB for .NET 4.6, .NET Standard 1.3 and .NET Standard 2.0 builds.

dwfrancis avatar Dec 19 '21 23:12 dwfrancis

Codecov Report

Merging #147 (9ac7e8d) into main (4f71b80) will increase coverage by 0.02%. The diff coverage is 89.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   87.60%   87.62%   +0.02%     
==========================================
  Files          25       25              
  Lines        3194     3233      +39     
  Branches      747      754       +7     
==========================================
+ Hits         2798     2833      +35     
- Misses        229      232       +3     
- Partials      167      168       +1     
Impacted Files Coverage Δ
csharp/PhoneNumbers/PhoneNumberOfflineGeocoder.cs 81.50% <89.58%> (+2.06%) :arrow_up:
csharp/PhoneNumbers/PhoneNumberUtil.cs 84.89% <0.00%> (+0.08%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4f71b80...9ac7e8d. Read the comment docs.

codecov-commenter avatar Dec 19 '21 23:12 codecov-commenter

The new tests for zipped geocoding fail on the appveyor build but pass locally. I've decompiled the artifact - the preprocessor directives don't seem to be applied.

Could it be an issue using FRAMEWORK_OR_GREATER

I can hold off on this PR until the net35 removal is done. That should simplify the preprocessor directives to just be !PORTABLE

dwfrancis avatar Dec 20 '21 14:12 dwfrancis

The issue was {FRAMEWORK}_OR_GREATER - all looks good now.

dwfrancis avatar Dec 20 '21 14:12 dwfrancis

Fixes large dll sizes - see issue #98

dwfrancis avatar Jan 03 '22 17:01 dwfrancis

@twcclegg any update on this? Zipping the metadata will significantly reduce the DLL sized needed for offline geocoding.

dwfrancis avatar May 23 '22 01:05 dwfrancis

Any plan on merging this PR? @twcclegg

JulianPasque avatar Jun 21 '22 14:06 JulianPasque

Would love to see this merged! 🙌

Ping @twcclegg

patrikwlund avatar Mar 06 '23 07:03 patrikwlund

Sorry I've neglected this. I think once this is rebased I can merge it. Things relating to portable or net framework an be removed.

twcclegg avatar Mar 06 '23 17:03 twcclegg