Giter VIP home page Giter VIP logo

Comments (2)

stokito avatar stokito commented on June 4, 2024

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.

stokito avatar stokito commented on June 4, 2024

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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).
  5. 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.
  6. 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.
  7. Tests are analyzed too which is not so useful.
  8. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.