Comments (2)
Also another problem here is that the inspection can be time consuming because of converting PSI tree to ClassData #10. Maybe to make a quick calculation we can make it ourself.
from ideajol.
First version was implemented and sent to be published.
Inspection called "Java | Memory | Class have too big memory footprint" and shows a warning "Class have too big memory footprint".
I tried on my working project and results are quite interesting. ATM we have few problems:
- Threshold is set to 64 (cache line) and this cause a lot of files to be reported. Maybe we have to change the default threshold.
- The whole class is getting marked with warning making the code unpleasant. Hotfix working only if set cursor on class name. I have to consult with JB plugin devs about how to do it better.
- Analyze is time consuming but it turned out not so slow as I expected. #10 should help a little bit. Also in fact we don't have to calculate full size, we need just to know that is bigger than threshold and skip other fields.
- A lot of DTOs are really HUGE: more than 3 cache lines it's quite ok here. I need to add an option to disable DTOs checking (by suffix DTO or Jackson annotation).
- Needs to be added to business login suffixes
Handler
,Factory
,Provider
,Utils
,Registry
,Filter
,Interceptor
,Executor
,Test
,Spec
. The checking should be allowed by an option. - It's better to show the size of object directly in message: "Class have too big memory footprint: 232" but this may consume more memory in IntelliJ.
- Tests are analyzed too which is not so useful.
- Most container and entity classes i.e. not DTOs but those who have
hashCode()
method are quite small. This is a good news.
from ideajol.
Related Issues (20)
- Adding support for 32-bytes aligned VMs
- Update to JOL 0.11
- Show contended groups instead of padding gaps
- Gradle build
- Minimize size of jol-core
- no work on Android studi 4.1.1 HOT 1
- StackOverflowError caused by non-compiling superclass recursion in source code HOT 2
- Update jol to latest version
- Inspection options: add description why threshold is by default 64
- IDE freeze with invalid source code causing superclass recursion HOT 2
- Regression: Inspection "Class has too big memory footprint" ignored suffixes are not editable HOT 1
- Kotlin support works, but not as described HOT 4
- Support for other languages: Go and C
- Lightweight Java Visualizer integration
- Plugin broken with IntelliJ IDEA 2023.1 Beta HOT 6
- Exception when apply a fix
- Explanation For Hotspot Options HOT 2
- Idea JOL broken in 2023.2 HOT 5
- 'com.github.stokito.IdeaJol.ShowObjectLayoutAction' must override `getActionUpdateThread` and chose EDT or BGT. BGT is prefferable HOT 2
- GUI. Large margins in between the fields.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ideajol.