• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Perfomance Tunig VisualVM, Query Console - Search using OQL?! What is an overallocated String ?

 
Greenhorn
Posts: 4
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am currently Profiling a Java Application with Java VisualVM (JDK 6.0.25)

When you use that tool to create a Heap Dump you can inspect the data in memory, that is nice but of course you can hardly click through 250.000 items to see if what class the chars/strings whatever belongs to.

But luckily there is a SQL like query editor ... however the syntax is bit tricky:

What I am searching for is all chars/strings that belong to a class called "ErrorPrinter".
How would you define such query?

Further: There is a sample query to find out "Overallocated String" ... well either my english is not good enough or I don't know ... but can anybody explain: What is an overallocated String and how to resolve that?

Thank you very much
 
Ranch Hand
Posts: 326
Android Mac OS X Firefox Browser
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use the term "overallocation of strings" in the sentence that you do things with the strings that you don't really need to do. One such thing is to use upper of lower case transformation when comparing strings or doing chained string concatenations that the server can't optimize in an easy way. this tends to lead to string objects that use more memory than the data that they really need to represent their strings.

That is also exactly what Jaroslav said at https://forums.oracle.com/forums/thread.jspa?messageID=9934208
 
Sebastian Wagner
Greenhorn
Posts: 4
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ove,

that sounds logical! Thanks!
Now I have to get comfortable with the Query Console Language OQL.

Sebastian
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic