{"id":23,"date":"2013-02-06T14:41:25","date_gmt":"2013-02-06T14:41:25","guid":{"rendered":"http:\/\/einaweb.es\/dev\/?p=23"},"modified":"2013-02-06T14:41:25","modified_gmt":"2013-02-06T14:41:25","slug":"jdeveloper-memory-and-performance","status":"publish","type":"post","link":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/","title":{"rendered":"JDeveloper Memory And Performance"},"content":{"rendered":"<div>\n<p>I was recently doing some training on ADF, and the students were complaining how slow JDeveloper was&#8230; Dragging and dropping Data Controls onto a JSF page? <b>It&#8217;s the pause of death<\/b> if you will. Not to mention the \u00abOut Of Memory\u00bb errors that crop up in the middle of debugging a large app. Very frustrating for developers, so I decided to once and for all get figure out what magic JVM tuning parameters would speed it up.<\/p>\n<p><b>As a general rule, Java is optimized for throughput, not latency.<\/b> Once the garbage collector kicks in, performance drops like a rock. A 2 second pause every once in a while is OK for a server, but for an IDE it&#8217;s misery. So here&#8217;s the fix:<\/p>\n<ol>\n<ol>\n<li>Go to your JDeveloper root directory, is should be something like <b>C:\\Oracle\\jdev\\Middleware\\jdeveloper<\/b><\/li>\n<li>Open the file <b>ide\\bin\\ide.conf<\/b>, scroll down to the default memory settings:<\/li>\n<\/ol>\n<\/ol>\n<pre>        AddVMOption  -Xms128M\r\n        AddVMOption  -Xmx768M<\/pre>\n<ol>\n<ol>\n<li>Boost the memory to something larger, like so:<\/li>\n<\/ol>\n<\/ol>\n<pre>        AddVMOption  -Xms1024M\r\n        AddVMOption  -Xmx1024M<\/pre>\n<ol>\n<ol>\n<li>Open the file <b>jdev\\bin\\jdev.conf<\/b><\/li>\n<li>Add the following config settings:<\/li>\n<\/ol>\n<\/ol>\n<pre>        # optimize the JVM for strings \/ text editing\r\n        AddVMOption -XX:+UseStringCache\r\n        AddVMOption -XX:+OptimizeStringConcat\r\n        AddVMOption -XX:+UseCompressedStrings\r\n\r\n        # if on a 64-bit system, but using less than 32 GB RAM, this reduces object pointer memory size\r\n        AddVMOption -XX:+UseCompressedOops\r\n\r\n        # use an aggressive garbage collector (constant small collections)\r\n        AddVMOption -XX:+AggressiveOpts\r\n\r\n        # for multi-core machines, use multiple threads to create objects and reduce pause times\r\n        AddVMOption -XX:+UseConcMarkSweepGC<\/pre>\n<ol>\n<li>Then restart JDeveloper&#8230; If it doesn&#8217;t start, you&#8217;ll need to reduce the amount of memory allocate in the <b>ide.conf<\/b> file from step 3.<\/li>\n<\/ol>\n<p>And that&#8217;s it! Your mileage may vary, of course&#8230; And you may need additional parameters, depending on what version of JDeveloper you&#8217;re running. Just keep in mind that you are <a href=\"http:\/\/themindstorms.wordpress.com\/2009\/01\/21\/advanced-jvm-tuning-for-low-pause\/\">tuning Java for shorter pauses<\/a>, and not greater throughput.<\/p>\n<p><b>UPDATE 1:<\/b> some students still had issues, so in addition to the JVM settings, I&#8217;ve found these tips also help out:<\/p>\n<p>Go to Tools \/ Preferences \/ Environment, and <b>switch to the \u00abWindows\u00bb look and feel<\/b>. The Oracle look and feel is prettier, but slower.<\/p>\n<p><b>Disable all extensions that you don&#8217;t need. This is usually a huge savings&#8230;<\/b> Go to Tools \/ Preferences \/ Extensions, and turn off thnigs you know you don&#8217;t need. One thing I do is disable all extensions by default, then enable only the ones I know I need for my current project. For example, disable everything, then enable only those extensions that start with ADF. This will automatically enable dependent extensions. Enable others (Portal, SOA, RIDC) only if needed.<\/p>\n<p><b>Open all documents in \u00abSource\u00bb mode by default.<\/b> Go to Tools \/ Preferences \/ File Types, and click the Default Editor tab. For all web pages (HTML, JSF, JSP) set the default editor to \u00abSource\u00bb. You can always click the \u00abDesign\u00bb tab to see the design. For best results, select items in the \u00abStructure\u00bb window (by default on lower left) and edit them in the \u00abProperty Inspector\u00bb window (by default on the lower right).<\/p>\n<p>If you really want to get extreme&#8230; you can <b>install a solid-state hard drive<\/b> for your workstation. Barring that, if you have enough RAM you can allocate 4 GB and create a <b>RAM driver<\/b> for your system. This looks like a normal hard drive, but it&#8217;s all in RAM. Then install JDeveloper on that, and it will be almost as good as a solid state drive.<br \/>\nOther developers have had success using<\/p>\n<p><b>UPDATE 2:<\/b> A reader has informed me that this line:<\/p>\n<pre>        #AddVMOption -XX:+AggressiveOpts<\/pre>\n<p>Breaks offline database support in JDeveloper&#8230; so that one will have to be avoided in some cases.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I was recently doing some training on ADF, and the students were complaining how slow JDeveloper was&#8230; Dragging and dropping Data Controls onto a JSF page? It&#8217;s the pause of death if you will. Not to mention the \u00abOut Of Memory\u00bb errors that crop up in the middle of debugging a large app. Very frustrating [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-jdevelopper"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JDeveloper Memory And Performance - Blog Desarrollador<\/title>\n<meta name=\"description\" content=\"JDeveloper Memory And Performance - Blog Desarrollador\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JDeveloper Memory And Performance - Blog Desarrollador\" \/>\n<meta property=\"og:description\" content=\"JDeveloper Memory And Performance - Blog Desarrollador\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Desarrollador\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-06T14:41:25+00:00\" \/>\n<meta name=\"author\" content=\"Angel Fernandez Gutierrez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@afernandezg76\" \/>\n<meta name=\"twitter:site\" content=\"@afernandezg76\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Angel Fernandez Gutierrez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/\",\"url\":\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/\",\"name\":\"JDeveloper Memory And Performance - Blog Desarrollador\",\"isPartOf\":{\"@id\":\"https:\/\/www.einaweb.es\/develop\/#website\"},\"datePublished\":\"2013-02-06T14:41:25+00:00\",\"dateModified\":\"2013-02-06T14:41:25+00:00\",\"author\":{\"@id\":\"https:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c\"},\"description\":\"JDeveloper Memory And Performance - Blog Desarrollador\",\"breadcrumb\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/www.einaweb.es\/develop\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JDeveloper Memory And Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.einaweb.es\/develop\/#website\",\"url\":\"https:\/\/www.einaweb.es\/develop\/\",\"name\":\"Blog Desarrollador\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.einaweb.es\/develop\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c\",\"name\":\"Angel Fernandez Gutierrez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.einaweb.es\/develop\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g\",\"caption\":\"Angel Fernandez Gutierrez\"},\"url\":\"http:\/\/www.einaweb.es\/develop\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JDeveloper Memory And Performance - Blog Desarrollador","description":"JDeveloper Memory And Performance - Blog Desarrollador","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":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/","og_locale":"es_ES","og_type":"article","og_title":"JDeveloper Memory And Performance - Blog Desarrollador","og_description":"JDeveloper Memory And Performance - Blog Desarrollador","og_url":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/","og_site_name":"Blog Desarrollador","article_published_time":"2013-02-06T14:41:25+00:00","author":"Angel Fernandez Gutierrez","twitter_card":"summary_large_image","twitter_creator":"@afernandezg76","twitter_site":"@afernandezg76","twitter_misc":{"Escrito por":"Angel Fernandez Gutierrez","Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/","url":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/","name":"JDeveloper Memory And Performance - Blog Desarrollador","isPartOf":{"@id":"https:\/\/www.einaweb.es\/develop\/#website"},"datePublished":"2013-02-06T14:41:25+00:00","dateModified":"2013-02-06T14:41:25+00:00","author":{"@id":"https:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c"},"description":"JDeveloper Memory And Performance - Blog Desarrollador","breadcrumb":{"@id":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.einaweb.es\/develop\/jdeveloper-memory-and-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/www.einaweb.es\/develop\/"},{"@type":"ListItem","position":2,"name":"JDeveloper Memory And Performance"}]},{"@type":"WebSite","@id":"https:\/\/www.einaweb.es\/develop\/#website","url":"https:\/\/www.einaweb.es\/develop\/","name":"Blog Desarrollador","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.einaweb.es\/develop\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c","name":"Angel Fernandez Gutierrez","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.einaweb.es\/develop\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g","caption":"Angel Fernandez Gutierrez"},"url":"http:\/\/www.einaweb.es\/develop\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":2,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":25,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/23\/revisions\/25"}],"wp:attachment":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}