{"id":15069478,"url":"https://github.com/stokito/ideajol","last_synced_at":"2025-10-29T23:39:38.321Z","repository":{"id":48735605,"uuid":"141497465","full_name":"stokito/IdeaJol","owner":"stokito","description":"Intellij plugin that shows an object layout in memory to help optimize it. Uses OpenJDK JOL tool","archived":false,"fork":false,"pushed_at":"2024-09-14T09:58:30.000Z","size":689,"stargazers_count":147,"open_issues_count":17,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-14T05:06:10.978Z","etag":null,"topics":["intellij-plugin","java","java-profiler","jol","openjdk"],"latest_commit_sha":null,"homepage":"https://plugins.jetbrains.com/plugin/10953-java-object-layout","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stokito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-18T22:45:00.000Z","updated_at":"2025-03-12T04:37:25.000Z","dependencies_parsed_at":"2024-09-25T01:42:47.185Z","dependency_job_id":null,"html_url":"https://github.com/stokito/IdeaJol","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokito%2FIdeaJol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokito%2FIdeaJol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokito%2FIdeaJol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stokito%2FIdeaJol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stokito","download_url":"https://codeload.github.com/stokito/IdeaJol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526953,"owners_count":20305115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["intellij-plugin","java","java-profiler","jol","openjdk"],"created_at":"2024-09-25T01:42:43.115Z","updated_at":"2025-09-18T00:34:19.134Z","avatar_url":"https://github.com/stokito.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Object Layout (JOL) plugin for IntelliJ Idea\n\n[JOL](https://github.com/openjdk/jol/) (Java Object Layout) is the tool to analyze object layout schemes in JVMs.\nFor example, in HotSpot VM on 64x processor an empty string takes 40 bytes i.e. 24 bytes for String object itself + 16 bytes for an internal empty char array.\n\nThe plugin is a GUI for JOL and allows you to make an estimate how much memory the object takes.\n\nSet a cursor into a class name and then press `Code / Show Object Layout` and you'll see a right panel with layout info.\n\n![screenshot.png](screenshot.png)\n\nThus, you can perform simplest but most efficient performance improvements.\nJust check your DTOs if they fit into 64 bytes of processor's cache line.\n\nOnly HotSpot VM is supported by JOL itself.\nThe plugin supports only basic estimate of class layout in different VM modes i.e. the same as `jol-cli estimates` command.\nFor more precise estimate use JOL library and estimate in run time on the real objects with `GraphLayout`:\n\n```java\nimport org.openjdk.jol.info.GraphLayout;\nimport java.util.HashMap;\n\npublic class JolTest {\n\n    public static void main(String[] args) {\n        HashMap\u003cObject, Object\u003e hashMap = new HashMap\u003c\u003e();\n        hashMap.put(\"key\", \"value\");\n        System.out.println(GraphLayout.parseInstance(hashMap).toFootprint());\n    }\n}\n```\n\nOutput will be like:\n\n    java.util.HashMap@7a79be86d footprint:\n         COUNT       AVG       SUM   DESCRIPTION\n             2        24        48   [B\n             1        80        80   [Ljava.util.HashMap$Node;\n             2        24        48   java.lang.String\n             1        48        48   java.util.HashMap\n             1        32        32   java.util.HashMap$Node\n             7                 256   (total)\n\nSo you can see the full size including inner objects.\n\n**NOTE:** Your app most likely will use the HotSpot with `64-bit VM, compressed references` mode. \n\n## Installation\n\n- Using IDE built-in plugin system:\n\n  \u003ckbd\u003eSettings/Preferences\u003c/kbd\u003e \u003e \u003ckbd\u003ePlugins\u003c/kbd\u003e \u003e \u003ckbd\u003eMarketplace\u003c/kbd\u003e \u003e \u003ckbd\u003eSearch for \"JOL\"\u003c/kbd\u003e \u003e\n  \u003ckbd\u003eInstall Plugin\u003c/kbd\u003e\n\n- Manually:\n\n  Download the [latest release](https://github.com/stokito/IdeaJol/releases/latest) and install it manually using\n  \u003ckbd\u003eSettings/Preferences\u003c/kbd\u003e \u003e \u003ckbd\u003ePlugins\u003c/kbd\u003e \u003e \u003ckbd\u003e⚙️\u003c/kbd\u003e \u003e \u003ckbd\u003eInstall plugin from disk...\u003c/kbd\u003e\n\n\n### Inspection\nThe plugin provides an inspection to see most big classes. It's enabled by default.\nYou can find the inspection by path `Java | Memory | JOL: Class has too big memory footprint` to configure or disable it. \n\nPlease leave a feedback for the [plugin in marketplace](https://plugins.jetbrains.com/plugin/10953-java-object-layout).\n\n\n## Tutorials\n* [Java Objects Inside Out](https://shipilev.net/jvm/objects-inside-out/) from the JOL author.\n* Видео: [Алексей Шипилёв — Java-объекты наизнанку](https://www.youtube.com/watch?v=q2wtSR3kD_I)\n* Video: [Java Object Layout | Ordinary Object Pointer | Object Header | CompressedOops | OpenJdk HotSpot JVM](https://www.youtube.com/watch?v=MK4rcxpwiuc)\n* Video: [JVM Benchmarking with Aleksey Shipilev](https://www.youtube.com/watch?v=x3Vlze1mUj4)\n\n\n## What is layouter\n\nJava VM and it's version.\n\nHotSpot is from OpenJDK. The Lilliput in development.\nThe Raw is a layout by itself without real gaps and aligns.\n\nCPU word size 32 or 64 bits i.e. size of a pointer.\n\nCOOPS is compressed references i.e. a trick to store 64 bits pointer in only 32 bits but all fields needs to be aligned.\n\nAlign is typically 8-byte but for a very large RAM may need to be 16-byte.\n\nCCPS is Compressed Classes in an object header i.e. 4 bytes instead of 8.\n\nYou may find most typical layouters here https://github.com/openjdk/jol/blob/master/jol-cli/src/main/java/org/openjdk/jol/operations/EstimatedModels.java\n\n\n## Related projects\n\nHeap dump `*.hprof` files analysers:\n * [The Lightweight Java Visualizer (LJV)](https://github.com/atp-mipt/ljv) a tool for visualizing Java data structures \n * The IntelliJ IDEA has a built-in [heap dump analyser](https://www.jetbrains.com/help/idea/analyze-hprof-memory-snapshots.html#read-snapshot)\n * Eclipse [Memory Analyzer (MAT)](https://www.eclipse.org/mat/)\n * [VisualVM](https://visualvm.github.io/) can also monitor heap in real time. Based on NetBeans\n * [Java Mission Control](https://github.com/openjdk/jmc)\n * [JMH Micro benchmarks tool](https://github.com/openjdk/jmh) and the [Intellij JMH plugin](https://github.com/artyushov/idea-jmh-plugin)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstokito%2Fideajol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstokito%2Fideajol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstokito%2Fideajol/lists"}