All Projects → stokito → IdeaJol

stokito / IdeaJol

Licence: Apache-2.0 license
IntellijIdea plugin for Java Object Layout (JOL) tool

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects
HTML
75241 projects

Projects that are alternatives of or similar to IdeaJol

qbicc
Experimental static compiler for Java programs.
Stars: ✭ 118 (+8.26%)
Mutual labels:  openjdk
IntelliJ-Luanalysis
Type-safe Lua IDE Plugin for IntelliJ IDEA
Stars: ✭ 118 (+8.26%)
Mutual labels:  intellij-plugin
intellij-firebase-highlighter
A Syntax Highlighter for Firebase Rules.
Stars: ✭ 26 (-76.15%)
Mutual labels:  intellij-plugin
go-orm-code-helper
🔥🔥🔥go-orm-code-helper is a goland plugin, it aims to make gorm code getting more simple
Stars: ✭ 22 (-79.82%)
Mutual labels:  intellij-plugin
homebrew-zulu
Homebrew Casks for Azul Zulu OpenJDK & Mission Control
Stars: ✭ 172 (+57.8%)
Mutual labels:  openjdk
ReactNativeTools
IntelliJ plugin, to make it easier to execute react-native commands
Stars: ✭ 26 (-76.15%)
Mutual labels:  intellij-plugin
idear
🎙️ Handsfree Audio Development Interface
Stars: ✭ 84 (-22.94%)
Mutual labels:  intellij-plugin
mvn-jlink
Maven plugin to provide way to work with jlink tool in maven projects
Stars: ✭ 34 (-68.81%)
Mutual labels:  openjdk
BugKotlinDocument
Plugin for IntelliJ IDEA ┗😃┛ Android Studio ┗😃┛ CLion ┗😃┛ AppCode.
Stars: ✭ 29 (-73.39%)
Mutual labels:  intellij-plugin
intelliroutes
Support for Play Routes in IntelliJ IDEA
Stars: ✭ 21 (-80.73%)
Mutual labels:  intellij-plugin
yet-another-emoji-support
This is the IntelliJ plugin that supports inserting emoji in editor using content assist.
Stars: ✭ 30 (-72.48%)
Mutual labels:  intellij-plugin
intellij-diff-plugin
Syntax highlighting for .diff files and .patch files in IntelliJ IDEs
Stars: ✭ 17 (-84.4%)
Mutual labels:  intellij-plugin
getx-snippets-intelliJ
An extension to accelerate the process of developing applications with flutter, aimed at everyone using the GetX package.
Stars: ✭ 52 (-52.29%)
Mutual labels:  intellij-plugin
material2-snippets
Visual studio extension & Intellij plugin for Angular Material 2, Teradata Covalent 1, Angular Flex layout 1 & Material icon snippets
Stars: ✭ 14 (-87.16%)
Mutual labels:  intellij-plugin
SideMirror
An Android Studio plugin to mirror your android devices with scrcpy directly from Android Studio.
Stars: ✭ 49 (-55.05%)
Mutual labels:  intellij-plugin
bootstrap4-snippets
Visual studio extension & Intellij plugin for Bootstrap 4, Font awesome 4, Font Awesome 5 Free & Pro snippets/live templates
Stars: ✭ 113 (+3.67%)
Mutual labels:  intellij-plugin
DockDockBuild
Support for running UNIX Makefiles on a Docker container
Stars: ✭ 43 (-60.55%)
Mutual labels:  intellij-plugin
lottie-idea
Android Studio and IntelliJ IDEA viewer plugin for Lottie animations
Stars: ✭ 36 (-66.97%)
Mutual labels:  intellij-plugin
reedelk-runtime
Reedelk Runtime Platform Community Edition
Stars: ✭ 25 (-77.06%)
Mutual labels:  intellij-plugin
SVNToolBox
Enhances IntelliJ IDEA SVN integration
Stars: ✭ 19 (-82.57%)
Mutual labels:  intellij-plugin

Java Object Layout (JOL) plugin for IntelliJ Idea

JOL (Java Object Layout) is the tool to analyze object layout schemes in JVMs. For 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.

The plugin is a GUI for JOL and allows you to make an estimate how much memory the object takes.

Set a cursor into a class name and then press Code / Show Object Layout and you'll see a right panel with layout info.

screenshot.png

Thus, you can perform simplest but most efficient performance improvements. Just check your DTOs if they fit into 64 bytes of processor's cache line.

Only HotSpot VM is supported by JOL itself. The plugin supports only basic estimate of class layout in different VM modes i.e. the same as jol-cli estimates command. For more precise estimate use JOL library and estimate in run time on the real objects with GraphLayout:

import org.openjdk.jol.info.GraphLayout;
import java.util.HashMap;

public class JolTest {

    public static void main(String[] args) {
        HashMap<Object, Object> hashMap = new HashMap<>();
        hashMap.put("key", "value");
        System.out.println(GraphLayout.parseInstance(hashMap).toFootprint());
    }
}

Output will be like:

java.util.HashMap@7a79be86d footprint:
     COUNT       AVG       SUM   DESCRIPTION
         2        24        48   [B
         1        80        80   [Ljava.util.HashMap$Node;
         2        24        48   java.lang.String
         1        48        48   java.util.HashMap
         1        32        32   java.util.HashMap$Node
         7                 256   (total)

So you can see the full size including inner objects.

NOTE: Your app most likely will use the HotSpot with 64-bit VM, compressed references mode.

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "JOL" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

Inspection

The plugin provides an inspection to see most big classes. It's enabled by default. You can find the inspection by path Java | Memory | JOL: Class has too big memory footprint to configure or disable it.

Please rank the Plugin to make it more searchable.

Related projects

Heap dump *.hprof files analysers:


Plugin based on the IntelliJ Platform Plugin Template.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].