{"id":1485,"date":"2013-08-18T12:12:02","date_gmt":"2013-08-18T15:12:02","guid":{"rendered":"https:\/\/devkico.itexto.com.br\/?p=1485"},"modified":"2013-08-18T12:12:02","modified_gmt":"2013-08-18T15:12:02","slug":"fazendo-groovy-gritar-melhorando-performance-dos-scripts-embarcados","status":"publish","type":"post","link":"https:\/\/devkico.itexto.com.br\/?p=1485","title":{"rendered":"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados"},"content":{"rendered":"<p><a href=\"http:\/\/www.youtube.com\/watch?v=Fa__6_5Z-wc&amp;feature=youtu.be\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1486\" alt=\"fast_groovy\" src=\"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg\" width=\"300\" height=\"169\" \/><\/a>Dando continuidade a s\u00e9rie de v\u00eddeos sobre Groovy e Grails, agora veremos como aumentar significativamente a performance dos scripts Groovy carregados din\u00e2micamente em uma aplica\u00e7\u00e3o Java.<\/p>\n<p>Como veremos, os ganhos de performance s\u00e3o significativos e a t\u00e9cnica muito simples: basta pr\u00e9-compilar os scripts antes destes serem executados. Tamb\u00e9m ser\u00e1 respondida a pergunta: &#8220;qual o impacto do Security Manager sobre a performance do sistema?&#8221;. Como mostro, desprez\u00edvel pra dizer o m\u00e1ximo. :)<\/p>\n<h2>Recursos para voc\u00eas se aprofundarem<\/h2>\n<p>A classe CompilerConfiguration:\u00a0<a href=\"http:\/\/groovy.codehaus.org\/api\/org\/codehaus\/groovy\/control\/CompilerConfiguration.html\">http:\/\/groovy.codehaus.org\/api\/org\/codehaus\/groovy\/control\/CompilerConfiguration.html<\/a><\/p>\n<p>Apesar de n\u00e3o levar benchmarks muito a s\u00e9rio, um que mostra a performance do Groovy n\u00e3o t\u00e3o distante assim do Java nativo (de 2012, as coisas melhoraram ainda mais este ano):\u00a0<a href=\"http:\/\/java.dzone.com\/articles\/groovy-20-performance-compared\">http:\/\/java.dzone.com\/articles\/groovy-20-performance-compared<\/a><\/p>\n<h2>C\u00f3digo fonte do v\u00eddeo<\/h2>\n<p>Todo o c\u00f3digo fonte, pra variar, est\u00e1 no GitHub:\u00a0<a href=\"https:\/\/github.com\/loboweissmann\/groovy-grails-na-pratica\">https:\/\/github.com\/loboweissmann\/groovy-grails-na-pratica<\/a>\u00a0(busque pela pasta embarcando_groovy_performance na ra\u00edz do projeto).<\/p>\n<h2>E o v\u00eddeo?<\/h2>\n<p>Eis o link:\u00a0<a href=\"http:\/\/www.youtube.com\/watch?v=Fa__6_5Z-wc&amp;feature=youtu.be\">http:\/\/www.youtube.com\/watch?v=Fa__6_5Z-wc&amp;feature=youtu.be<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Que tal melhorar em ordens de magnitude a performance dos scripts Groovy embarcados em seu projeto Java?<br \/>\nNeste v\u00eddeo mostro como e tamb\u00e9m o &#8220;impacto&#8221; do Security Manager do Java sobre a sua aplica\u00e7\u00e3o. :)<\/p>\n","protected":false},"author":1,"featured_media":1486,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1485","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-groovy"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados - \/dev\/Kico<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devkico.itexto.com.br\/?p=1485\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados - \/dev\/Kico\" \/>\n<meta property=\"og:description\" content=\"Que tal melhorar em ordens de magnitude a performance dos scripts Groovy embarcados em seu projeto Java? Neste v\u00eddeo mostro como e tamb\u00e9m o &quot;impacto&quot; do Security Manager do Java sobre a sua aplica\u00e7\u00e3o. :)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devkico.itexto.com.br\/?p=1485\" \/>\n<meta property=\"og:site_name\" content=\"\/dev\/Kico\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-18T15:12:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"169\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kico (Henrique Lobo Weissmann)\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@loboweissmann\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kico (Henrique Lobo Weissmann)\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devkico.itexto.com.br\/?p=1485\",\"url\":\"https:\/\/devkico.itexto.com.br\/?p=1485\",\"name\":\"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados - \/dev\/Kico\",\"isPartOf\":{\"@id\":\"https:\/\/devkico.itexto.com.br\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/devkico.itexto.com.br\/?p=1485#primaryimage\"},\"image\":{\"@id\":\"https:\/\/devkico.itexto.com.br\/?p=1485#primaryimage\"},\"thumbnailUrl\":\"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg\",\"datePublished\":\"2013-08-18T15:12:02+00:00\",\"dateModified\":\"2013-08-18T15:12:02+00:00\",\"author\":{\"@id\":\"https:\/\/devkico.itexto.com.br\/#\/schema\/person\/502ab8892631bb005d6da2269fe5a3a7\"},\"breadcrumb\":{\"@id\":\"https:\/\/devkico.itexto.com.br\/?p=1485#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devkico.itexto.com.br\/?p=1485\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/devkico.itexto.com.br\/?p=1485#primaryimage\",\"url\":\"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg\",\"contentUrl\":\"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg\",\"width\":300,\"height\":169},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devkico.itexto.com.br\/?p=1485#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/devkico.itexto.com.br\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devkico.itexto.com.br\/#website\",\"url\":\"https:\/\/devkico.itexto.com.br\/\",\"name\":\"\/dev\/Kico\",\"description\":\"Desenvolvendo software\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devkico.itexto.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/devkico.itexto.com.br\/#\/schema\/person\/502ab8892631bb005d6da2269fe5a3a7\",\"name\":\"Kico (Henrique Lobo Weissmann)\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/devkico.itexto.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dd6973d86a689bc63122b2e603f25be3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dd6973d86a689bc63122b2e603f25be3?s=96&d=mm&r=g\",\"caption\":\"Kico (Henrique Lobo Weissmann)\"},\"sameAs\":[\"https:\/\/x.com\/loboweissmann\"],\"url\":\"https:\/\/devkico.itexto.com.br\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados - \/dev\/Kico","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devkico.itexto.com.br\/?p=1485","og_locale":"pt_BR","og_type":"article","og_title":"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados - \/dev\/Kico","og_description":"Que tal melhorar em ordens de magnitude a performance dos scripts Groovy embarcados em seu projeto Java? Neste v\u00eddeo mostro como e tamb\u00e9m o \"impacto\" do Security Manager do Java sobre a sua aplica\u00e7\u00e3o. :)","og_url":"https:\/\/devkico.itexto.com.br\/?p=1485","og_site_name":"\/dev\/Kico","article_published_time":"2013-08-18T15:12:02+00:00","og_image":[{"width":300,"height":169,"url":"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg","type":"image\/jpeg"}],"author":"Kico (Henrique Lobo Weissmann)","twitter_card":"summary_large_image","twitter_creator":"@loboweissmann","twitter_misc":{"Escrito por":"Kico (Henrique Lobo Weissmann)","Est. tempo de leitura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devkico.itexto.com.br\/?p=1485","url":"https:\/\/devkico.itexto.com.br\/?p=1485","name":"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados - \/dev\/Kico","isPartOf":{"@id":"https:\/\/devkico.itexto.com.br\/#website"},"primaryImageOfPage":{"@id":"https:\/\/devkico.itexto.com.br\/?p=1485#primaryimage"},"image":{"@id":"https:\/\/devkico.itexto.com.br\/?p=1485#primaryimage"},"thumbnailUrl":"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg","datePublished":"2013-08-18T15:12:02+00:00","dateModified":"2013-08-18T15:12:02+00:00","author":{"@id":"https:\/\/devkico.itexto.com.br\/#\/schema\/person\/502ab8892631bb005d6da2269fe5a3a7"},"breadcrumb":{"@id":"https:\/\/devkico.itexto.com.br\/?p=1485#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devkico.itexto.com.br\/?p=1485"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/devkico.itexto.com.br\/?p=1485#primaryimage","url":"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg","contentUrl":"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg","width":300,"height":169},{"@type":"BreadcrumbList","@id":"https:\/\/devkico.itexto.com.br\/?p=1485#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devkico.itexto.com.br\/"},{"@type":"ListItem","position":2,"name":"Fazendo o Groovy gritar: melhorando a performance dos scripts embarcados"}]},{"@type":"WebSite","@id":"https:\/\/devkico.itexto.com.br\/#website","url":"https:\/\/devkico.itexto.com.br\/","name":"\/dev\/Kico","description":"Desenvolvendo software","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devkico.itexto.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-BR"},{"@type":"Person","@id":"https:\/\/devkico.itexto.com.br\/#\/schema\/person\/502ab8892631bb005d6da2269fe5a3a7","name":"Kico (Henrique Lobo Weissmann)","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/devkico.itexto.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dd6973d86a689bc63122b2e603f25be3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6973d86a689bc63122b2e603f25be3?s=96&d=mm&r=g","caption":"Kico (Henrique Lobo Weissmann)"},"sameAs":["https:\/\/x.com\/loboweissmann"],"url":"https:\/\/devkico.itexto.com.br\/?author=1"}]}},"jetpack_featured_media_url":"https:\/\/devkico.itexto.com.br\/wp-content\/uploads\/2013\/08\/fast_groovy.jpg","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1485"}],"collection":[{"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1485"}],"version-history":[{"count":3,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1485\/revisions"}],"predecessor-version":[{"id":1489,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1485\/revisions\/1489"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=\/wp\/v2\/media\/1486"}],"wp:attachment":[{"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devkico.itexto.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}