You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 unified (v 5.1.0) our tools detected approximately 25 unused function in dependencies. Removing those functions, the size of unified bundled could be reduced at least 10% (All tests passed). I’m attaching the reduced version of your project. unified(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,
The text was updated successfully, but these errors were encountered:
This research is kind-off useless to me though, because:
a) I have no idea which functions your algorithm removed;
b) Unified will never be dropped in on its own, always used with other modules, which probably do use some of those functions.
To answer your questions:
-Did you were aware of the existence of these unused functions in your projects?
I’ve rewritten some parts to reduce that amount. Such as including some parts of Node’s pipes internally. I kinda think 10% is nice. But I’d love to know what you did to
-Do you think that this is a problem?
-Do you think that can be useful a tool for deal with this kind of problem?
No, such fixes should be implemented in a build step, not by libraries such as this.
UPDATE
I checked more in depth, and it seems:
polyfills are removed, which are in place to deal with different user agents and should not be removed;
function replaceExt, function location, and some setters are erroneously removed, the whole function bodies are stripped!
From what I gather you use the tests of unified to check the bundle. However, dependencies also have tests and those tests don’t need to be added to unified itself. Those tests are not included in your algorithm though.
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 unified (v 5.1.0) our tools detected approximately 25 unused function in dependencies. Removing those functions, the size of unified bundled could be reduced at least 10% (All tests passed). I’m attaching the reduced version of your project.
unified(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,
The text was updated successfully, but these errors were encountered: