Skip to main content

Posts

Showing posts with the label jprofiler

Which Java profiler is better: JProfiler or YourKit?

Which profiler is better for general purpose profiling and heap analysis? 90% of our apps are standalone command line programs with substantial database and numeric processing. The other 10% are webapps/servlet container apps (with very little JSP and NO SCRIPLETS!). Target user would be Sr Software Engineer with 5-10 years of industry experience. We need support only for Sun JDK 5 and.

Is there any Relation between Iterator.hasNext and for-each loop

I was using JProfiler for profiling of my application, as it is a huge application so I am very aware of its performance and efficiency. It was taking too long so I replace all Iterator.hasNext with for-each but when I am seeing in the JProfilers CPU view it is showing me Iterator.hasNext method called where I am using for-each . Why does so? Is there any relation between these two? Here is the example code : List<Map<String, Object>> mapList = jdbcTemplate .queryForList(MAP.SELECT_ALL); for (Map<String, Object> map : mapList) { list.add(fillPreferenceMaster(preferenceMasterMap)); }