mapbox / geojsonhint

IMPORTANT: This repo will be archived. Use @placemarkio/check-geojson instead
ISC License
258 stars 37 forks source link

Problem with unused library functions #60

Closed hcvazquez closed 7 years ago

hcvazquez commented 7 years ago

My name is Hernan; with a group of colleagues we are conducting a research about unused code present in dependencies of JavaScript projects. We call this functions, UFF (Unused foreign functions). We found that in most projects there exist a great amount of UFF that are being included in the final bundle.

In the case of geojsonhint (2.0.0) our tools detected approximately 14 unused function in the dependencies. Removing those functions, the size of geojasonhint bundled could be reduced at least 7% (All tests passed). I’m attaching the reduced version of your project. geojsonhint(optimized).txt

I’ll be very grateful if you can answer me the following questions: -Did you were aware of the existence of these unused functions in your projects? -Do you think that this is a problem? -Do you think that can be useful a tool for deal with this kind of problem?

Thanks in advance.

Cheers,

tmcw commented 7 years ago

Closing; thanks for the analysis. A 7% decrease in bundle size is relatively insignificant; it's something I'd happily accept as a uglify improvement but otherwise have higher priorities.