paint-brush
U karhele hi Slow Maven Builds? U Nga Ha Lava Ku Ringeta MVNDhi@realgpp
Matimu lamantshwa

U karhele hi Slow Maven Builds? U Nga Ha Lava Ku Ringeta MVND

hi Giuseppe Baglio4m2025/01/28
Read on Terminal Reader

Ku leha ngopfu; Ku hlaya

MVND yi hatlisisa ku aka ka Maven hi ku tirhisa nakambe swikombiso swa JVM, ku hunguta minkarhi yo aka hi ku fika eka 40%. Hi ku hlanganisiwa ko olova na nseketelo ku suka eka ntlawa wa Apache Maven, i game-changer eka vatumbuluxi.
featured image - U karhele hi Slow Maven Builds? U Nga Ha Lava Ku Ringeta MVND
Giuseppe Baglio HackerNoon profile picture
0-item

Loko u tshame u tikuma u ri karhi u chaya tintiho ta wena ehenhla ka desika ra wena, u rindzele leswaku ku akiwa ka Maven ku hela, a wu wexe. Minkarhi yo aka yi nga va xiphiqo lexikulu eka maendlelo ya ntirho wa nhluvukiso, ngopfungopfu eka tiphurojeke letikulu . MVND , the Maven Daemon , i xitirhisiwa xo cinca ntlangu lexi vekiweke ku hundzula endlelo ra wena ro aka.


Maven Daemon i kungu ra ntlawa wa Apache Maven . Eka xisekelo xa yona, MVND yi endleriwe ku endla nchumu wun’we: endla leswaku ku aka ka wena ka Maven hi ku hatlisa . Hi ku hlayisa JVM yi kufumela no yi tirhisa nakambe eka ku aka hinkwako, MVND yi herisa mali yo tala yo sungula JVM leyintshwa eka ku aka kun’wana na kun’wana, leswi endlaka leswaku ku hlayisiwa nkarhi lowukulu .


Kambe rivilo a hi rona ntsena trick up MVND's sleeve. Swi tisa mimpfuno yin’wana etafuleni:

- Minkarhi yo sungula hi ku hatlisa ku fana na rihati

- Tindlela ta smart caching

- Vuswikoti byo aka phurojeke lebyi fambelanaka

- Ku hungutiwa ka memory footprint


A ndzi nge ku borhi hi tibuku ta ku nghenisa kumbe swilo leswitsongo swa ku lulamisa eka xihloko lexi, tanihi leswi matsalwa ya ximfumo ma endlaka ntirho lowunene swinene wo funengeta vuxokoxoko byebyo. Ematshan’wini ya sweswo, hi ta kongomisa eka swikombiso swa xiviri ku vona MVND yi ri karhi yi tirha. Hi ta pima matirhelo ya yona, hi yi pimanisa na ku aka ka ndhavuko, na ku kombisa hilaha yi voningaka hakona hakunene. Kunga khathariseki leswaku u tirha eka phurojeke leyitsongo, yo kongoma kumbe sisiteme leyikulu, leyi rharhanganeke ya timodyuli to tala , eku heleni ka xihloko lexi, u ta vona leswaku ha yini MVND yi ri ku engeteriwa ka nkoka eka maendlelo ya wena ya ntirho wa nhluvukiso .


Matirhelo ya Misava ya Xiviri: Maven vs. MVND Build Times

Ku twisisa hakunene nkucetelo wa MVND, a hi languteni minkarhi yin’wana ya xiviri yo aka ku suka eka tiphurojeke timbirhi to hambana. Data leyi nga laha hansi yi pimanisa matirhelo ya MVND na ku aka ka ndhavuko ka Maven , ku kombisa mimpfuno ya yona leyi vonakaka.

Dyondzo ya Xikombiso 1: Phurojeke yo Olova

Eka xikombiso xa hina xo sungula, hi tirhisa vuhlayiselo bya archetype bya Adobe AEM2, phurojeke ya ntolovelo ya mimojula yo tala leyi tirhaka tanihi xifaniso xa de facto xo sungula tiphurojeke ta AEM. Phurojeke leyi yi tiveka hi minkarhi ya yona yo hatlisa yo aka, leswi endlaka leswaku yi va n’wandla wa kahle swinene wo languta nkucetelo wa MVND.


Phurojeke yo olova — mvn (exineneni) vs mvnd (exineneni) nkarhi wo aka


  • Nkarhi wo Aka Maven: 34.669 wa tisekoni
  • Nkarhi wo Aka MVND: 20.816 wa tisekoni


MVND yi hunguta nkarhi wo aka hi kwalomu ka 40% , yi hlayisa ku tlula 11 wa tisekoni. Loko mimojula yin’wana ya munhu hi xiyexe yi nga kombisa minkarhi yo leha nyana yo aka na MVND, ku vuyeriwa ka vukorhokeri hinkwabyo a ku kanetiwi. Ku antswisiwa loku ku vangiwa hi vuswikoti bya MVND byo khoma parallelism hi ndlela leyinene, ku antswisa endlelo ro aka.

Dyondzo ya Xikombiso 2: Phurojeke leyi rharhanganeke

Xikombiso xa hina xa vumbirhi i phurojeke yo rharhangana, ya xiviri ku suka eka yin’wana ya tindhawu ta vuhumelerisi bya muxavi wa mina. Phurojeke leyi, leyi akiweke hi ku tirhisa archetype ya AEM, yi katsa swikambelo swo tala swa tiyuniti swa khodi ya core (Java) na UI frontend (Node.js), na 697 wa swikambelo swa Java na 799 wa swikambelo swa Node.js.


Phurojeke yo rharhangana — mvn (exineneni) vs mvnd (exineneni) nkarhi wo aka


  • Nkarhi wo Aka Maven: 02:52 wa timinete
  • MVND Nkarhi wo Aka: 01:41 wa timinete

MVND yi kombisa ku hunguteka loku hlamarisaka ka 41% eka nkarhi wo aka, ku hlayisa 71 wa tisekoni. Hambi leswi mimojula yin’wana yi tekaka nkarhinyana na MVND, ku antswisiwa ka nkarhi wo aka hi ku angarhela i kukulu swinene. Leswi swi ringanyeta leswaku tindlela ta ku antswisa MVND ti vuyerisa ngopfu na le ka tiphurojeke leti rharhanganeke, ta timodyuli to tala.

Mahetelelo

By reusing JVM instances and optimizing parallel execution , MVND yi nyika ku hlayisiwa ka nkarhi lokukulu eka tiphurojeke hinkwato ta vukulu hinkwabyo. Ku nga khathariseki leswaku u tirha eka xikombiso xo olova kumbe xitirhisiwa xa bindzu lexi rharhanganeke, MVND yi nga olovisa endlelo ra wena ro aka , yi ku pfumelela ku dzikisa mianakanyo eka leswi nga swa nkoka swinene .


MVND yi humelela hikwalaho ka swivangelo swinharhu swa nkoka:

  • Minkarhi yo Aka hi ku hatlisa: Swikombiso leswi nga laha henhla swi kombisa ku antswisiwa ka ~40% eka minkarhi yo aka hi MVND. Hambi leswi ku vuyeriwa loku kongomeke ku nga ha hambana ku ya hi vukulu bya phurojeke ya wena na ku rharhangana, u nga langutela ku antswisiwa ka matirhelo loku nga cincekiki eka tiphurojeke to hambana, leswi endlaka leswaku MVND yi va nhlawulo lowu tshembekaka wo hatlisisa ku aka ka wena.


  • Ku olova ka ku amukela: Tanihi xisirhelelo xo drop-in xa Maven hi dizayini, MVND yi lava ku cinca kutsongo eka xiyimiso xa wena lexi nga kona, leswi endlaka leswaku swi nga vi na matshalatshala ku hlanganisa eka maendlelo ya wena ya ntirho.


  • Ku tshembeka: Hi ku seketeriwa hi ntlawa wa Apache Maven, MVND i xitirhisiwa lexi tshembekaka no seketeriwa kahle lexi fambisanaka na swiyimo swa indasitiri.

Miehleketo yo Hetelela

Emisaveni leyi sekoni yin’wana na yin’wana yi hlayekaka, MVND yi humelela tanihi mucinci wa ntlangu eka vatumbuluxi, yi va nyika matimba yo aka hi ku hatlisa, hi vutlhari, na hi ndlela leyinene. With its proven ability to slash build times by up to 40% , MVND i no-brainer eka mani na mani loyi a lavaka ku antswisa maendlelo ya vona ya ntirho na ku tlakusa vuhumelerisi.


Kambe u nga teki rito ra mina ntsena — vona ku hambana hi wexe . Ringeta MVND eka tiphurojeke ta wena naswona u vona hi mahlo ndlela leyi yi hundzulaka endlelo ra wena ro aka ha yona. Kunga khathariseki leswaku u tirha eka xikombiso lexitsongo kumbe xitirhisiwa xa bindzu lerikulu, MVND i xitirhisiwa lexi ku pfunaka ku kongomisa eka leswi nga swa nkoka hakunene: ku tisa sofwere ya xiyimo xa le henhla, hi ku hatlisa.

[1] https://github.com/apache/maven-mvnd: Xitsonga xitsonga xitsonga xitsonga xitsonga xitsonga xitsonga xitsonga xitsonga xitsonga

[2] https://github.com/adobe/xivumbeko-xa-xivumbeko-xa-phurojeke-ya-aem