Skip to content

Tag: performance

Java CharAt() and deleteCharAt() performance

I’ve been wondering about the implementation of charAt function for String/StringBuilder/StringBuffer in java what is the complexity of that ? also what about the deleteCharAt() in StringBuffer/StringBuilder ? Answer For String, StringBuffer, and StringBuilder, charAt() is a constant-time operation. For StringBuffer and StringBuilder, deleteCharAt() is a linear-time operation. StringBuffer and StringBuilder have very similar performance characteristics. The primary difference is

Hibernate : dynamic-update dynamic-insert – Performance Effects

Using dynamic-update or dynamic-insert has positive, though generally slight only on performance, as also mentioned by But the reference documentation mentions that this could have negative performance effects also as mentioned below in : Although these settings can increase performance in some cases, they can actually decrease performance in others. Can anybody please suggest some example/scenario mentioning negative

How to monitor slow SQL queries executed by JPA and Hibernate

Is there any Hibernate property I could set to see all the slow queries? I’, interested in queries that take too much time to return the result set. I’m using Spring with Hibernate, configured via an applicationContext.xml Spring configuration file. Answer I have 2 suggestions: you could use Oracle’s Statspack. you could use some kind of JDBC proxy driver logging

Running out of java heap space- 15 puzzle problem

G’day all, I tried the solution for eight puzzle problem posted here by joel Neely and played around with it and modified it so that can be used to solve for higher grids[Changed the String representation of the grid to two dimensional integer representation and modified the logic accordingly]. However the modified code can solve the 3×3 grids but quickly

Java Large Files Disk IO Performance

I have two (2GB each) files on my harddisk and want to compare them with each other: Copying the original files with Windows explorer takes approx. 2-4 minutes (that is reading and writing – on the same physical and logical disk). Reading with twice and comparing the byte arrays on a byte per byte basis takes 20+ minutes.