当前位置: X-MOL 学术Inf. Softw. Technol. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Simplifying the Search of npm Packages
Information and Software Technology ( IF 3.9 ) Pub Date : 2020-06-07 , DOI: 10.1016/j.infsof.2020.106365
Ahmad Abdellatif , Yi Zeng , Mohamed Elshafei , Emad Shihab , Weiyi Shang

Context

Code reuse, generally done through software packages, allows developers to reduce time-to-market and improve code quality. The npm ecosystem is a Node.js package management system which contains more than 700 K Node.js packages and to help developers find high-quality packages that meet their needs, npms developed a search engine to rank Node.js packages in terms of quality, popularity, and maintenance. However, the current ranking mechanism for npms tends to be arbitrary and contains many different equations, which increases complexity and computation.

Objective

The goal of this paper is to empirically improve the efficiency of npms by simplifying the used components without impacting the current npms package ranks.

Method

We use feature selection methods with the aim of simplifying npms’ equations. We remove the features that do not have a significant effect on the package’s rank. Then, we study the impact of the simplified npms on the packages’ rank, the amount of resources saved compared to the original npms, and the performance of the simplified npms as npm evolves.

Results

Our findings indicate that (1) 31% of the unique variables of npms’ equation can be removed without breaking the original packages’ ranks; (2) The simplified npms, on average, preserves the overlapping of the packages by 98% and the ranking of those packages by 97%; (3) Using the simplified npms saves 10% of packages scoring time and more than 1.47 million network requests on each scoring run; (4) As the npm evolve through a period of 12 months, the simplified-npms was able to achieve results similar to the original npms.

Conclusion

Our results show that the simplified npms preserves the original ranks of packages and is more efficient than the original npms. We believe that using our approach, helps the npms community speed up the scoring process by saving computational resources and time.



中文翻译:

简化npm软件包的搜索

语境

通常通过软件包完成的代码重用使开发人员可以缩短产品上市时间并提高代码质量。npm生态系统是一个Node.js软件包管理系统,其中包含700,000多个Node.js软件包,为了帮助开发人员找到满足其需求的高质量软件包,npms开发了一个搜索引擎,以按质量对Node.js软件包进行排名,受欢迎程度和维护。但是,当前对npms的排名机制往往是任意的,并且包含许多不同的方程式,这增加了复杂性和计算量。

目的

本文的目的是在不影响当前npms封装等级的情况下,通过简化所使用的组件,以经验方式提高npms的效率。

方法

我们使用特征选择方法来简化npms方程。我们删除了对包装等级没有重大影响的功能。然后,我们研究简化npms对程序包等级的影响,与原始npms相比节省的资源量以及简化npms随着npm的发展而产生的性能。

结果

我们的发现表明:(1)可以删除npms方程的唯一变量的31%,而不会破坏原始软件包的排名;(2)平均而言,简化的npm可以使程序包的重叠率保持98%,而程序包的排名则可以保持97%;(3)使用简化的npms可以节省10%的软件包计分时间,并在每次计分运行中节省超过147万个网络请求;(4)随着npm的发展历时12个月,简化的npms能够获得与原始npm相似的结果。

结论

我们的结果表明,简化的npms保留了原始包的等级,并且比原始npms更有效。我们相信使用我们的方法,可以通过节省计算资源和时间来帮助npms社区加快评分过程。

更新日期:2020-06-07
down
wechat
bug