{"id":105136,"date":"2022-09-19T21:36:45","date_gmt":"2022-09-19T19:36:45","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript"},"modified":"2022-09-19T21:36:45","modified_gmt":"2022-09-19T19:36:45","slug":"facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript","status":"publish","type":"post","link":"https:\/\/prohoster.info\/ro\/blog\/news\/facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript","title":{"rendered":"Facebook a deschis codul framework-ului pentru detectarea scurgerilor de memorie \u00een JavaScript","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Compania Facebook (interzis\u0103 \u00een RF) a deschis codul surs\u0103 al instrumentului memlab, destinat analizei instantaneelor st\u0103rii memoriei dinamice (heap), identific\u0103rii strategiilor de optimizare a utiliz\u0103rii memoriei \u0219i detect\u0103rii scurgerilor de memorie care apar la executarea codului \u00een limbajul JavaScript. Codul este disponibil sub licen\u021ba MIT.    <\/p>\n<p>Framework-ul a fost creat pentru a analiza cauzele unui consum mare de memorie \u00een timpul utiliz\u0103rii site-urilor web \u0219i aplica\u021biilor web. De exemplu, cu ajutorul memlab a fost analizat consumul de memorie utilizat de noua versiune a site-ului Facebook.com, ceea ce a permis identificarea scurgerilor care duceau la \u00eenchiderea nea\u0219teptat\u0103 a browserului pe client din cauza epuiz\u0103rii memoriei libere.     <\/p>\n<p>Cauzele scurgerilor de memorie \u00een timpul execut\u0103rii codului JavaScript pot fi legate de existen\u021ba unor referin\u021be ascunse la obiecte, ce \u00eempiedic\u0103 colectorul de gunoi s\u0103 elibereze memoria ocupat\u0103 de obiect, de o cache nefavorabil\u0103 a valorilor sau de implementarea unui scroll infinit f\u0103r\u0103 a elimina elementele mai vechi din list\u0103. De exemplu, \u00een codul de mai jos, \u00een Chrome, scurgerea de memorie apare din cauza obiectului &#171;obj&#187;, \u00een ciuda faptului c\u0103 \u00eei este atribuit\u0103 valoarea null, deoarece Chrome p\u0103streaz\u0103 referin\u021be interne la obiectele afi\u0219ate pentru a oferi posibilitatea inspect\u0103rii lor ulterioare \u00een consola web.        var obj = {};    console.log(obj);    obj = null;        <\/p>\n<p>Func\u021bionalit\u0103\u021bile principale ale memlab:  <\/p>\n<ul>\n<li class=\"l\"> Detectarea scurgerilor de memorie \u00een browser. Memlab permite compararea automat\u0103 a instantaneelor st\u0103rii memoriei dinamice, identificarea scurgerilor de memorie \u0219i agregarea rezultatelor.\n<li class=\"l\"> API orientat pe obiect pentru parcurgerea heap-ului, care permite implementarea propriilor algoritmi de detectare a scurgerilor \u0219i realizarea sistemelor de analiza instantaneelor st\u0103rii heap-ului. Este suportat\u0103 analiza heap-ului pentru browserele bazate pe motorul Chromium, precum \u0219i pentru platformele Node.js, Electron \u0219i Hermes.\n<li class=\"l\"> Interfa\u021b\u0103 de linie de comand\u0103 \u0219i API pentru c\u0103utarea oportunit\u0103\u021bilor de optimizare a utiliz\u0103rii memoriei.\n<li class=\"l\"> Sistem de aser\u021bi pentru Node.js, care permite crearea de teste unitare \u0219i executarea programelor bazate pe Node.js pentru a crea instantanee ale propriei st\u0103ri, pentru a verifica propria memorie sau pentru a scrie aser\u021bi extin\u0219i.  <\/ul>\n<p>Sursa: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=57802\">opennet.ro<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Facebook (\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0430 \u0432 \u0420\u0424) \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f memlab, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0440\u0435\u0437\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043a\u0443\u0447\u0438), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0438 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript. \u041a\u043e\u0434 \u043e\u0442\u043a\u0440\u044b\u0442 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT. \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u043f\u0440\u0438\u0447\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 web-\u0441\u0430\u0439\u0442\u0430\u043c\u0438 \u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-105136","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Facebook (\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0430 \u0432 \u0420\u0424) \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f memlab, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0440\u0435\u0437\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043a\u0443\u0447\u0438), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/ro\/blog\/news\/facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"ro_RO\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Facebook \u043e\u0442\u043a\u0440\u044b\u043b \u043a\u043e\u0434 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 JavaScript | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Facebook (\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0430 \u0432 \u0420\u0424) \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f memlab, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0440\u0435\u0437\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043a\u0443\u0447\u0438), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/ro\/blog\/news\/facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-09-19T19:36:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-09-19T19:36:45+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Facebook a deschis codul framework-ului pentru detectarea scurgerilor de memorie \u00een JavaScript | ProHoster","description":"Compania Facebook (interzis\u0103 \u00een RF) a deschis codurile surs\u0103 ale instrumentului memlab, destinat analizei instantaneelor de stare a memoriei distribuite dinamic (heap), stabilind strategia de optimizare a func\u021bion\u0103rii acesteia.","canonical_url":"https:\/\/prohoster.info\/ro\/blog\/news\/facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"ro_RO","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Facebook \u043e\u0442\u043a\u0440\u044b\u043b \u043a\u043e\u0434 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 JavaScript | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Facebook (\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0430 \u0432 \u0420\u0424) \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u044b \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f memlab, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441\u0440\u0435\u0437\u043e\u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 (\u043a\u0443\u0447\u0438), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441.","og:url":"https:\/\/prohoster.info\/ro\/blog\/news\/facebook-otkryl-kod-frejmvorka-dlya-vyyavleniya-utechek-pamyati-v-javascript","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2022-09-19T19:36:45+00:00","article:modified_time":"2022-09-19T19:36:45+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/105136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/comments?post=105136"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/posts\/105136\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/media?parent=105136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/categories?post=105136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/ro\/wp-json\/wp\/v2\/tags?post=105136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}