performance 2 « performance « Java Testing Q&A

Home
Java Testing Q&A
1.Development
2.FindBugs
3.HTMLUnit
4.hudson
5.junit
6.performance
7.plugin
8.profile
9.selenium
10.Tools
11.unit test
Java Testing Q&A » performance » performance 2 

1. which toString() method can be used performance wise?    stackoverflow.com

I am working on one project for performance enhancement. I had one doubt, while we are during a process, we tend to trace the current state of the DTO and ...

2. Which features make a laptop fast for Java development?    stackoverflow.com

I remember, earlier CPU speed was the most important thing. But today I am confused. Which features determine the most if a laptop can smoothly run Eclipse with lots and lots ...

3. Java 3D performance poor after latest NVIDIA driver update to 257.21    stackoverflow.com

I Hava a GeForce 9088GTX+ 512MB card and updated my driver from 191.07 to 257.21. Now When I run a Java3D application i made, it runs really slowly (seems like ...

4. Fastest way to draw BufferedImages to another BufferedImage    stackoverflow.com

I am attempting to create a mosaic of images in Java. I calculate the size of the new image I'm creating, and then for each subimage that will be part ...

5. Performance of creating XML using StringTemplate?    stackoverflow.com

I'm developing an application which uses different components to create an XHTML document, I used StringTemplate for creating the document data of the components and then combined them into a one ...

6. What is more expensive? Assignment or declaration?    stackoverflow.com

Just a quick question what would be more expensive in Java?

   double test = 5;
   double test1 = 5;
or
   double test = 5;
   ...

7. Which of these methods is most effective when I traverse a List?    stackoverflow.com

List<T> list = new ArrayList<T>();
1 method:
for(int i = list.length - 1; i >= 0; i--) {
  System.out.println(list.get(i));
}
2 method:
for(T t : list) {
  System.out.println(t);
}
3 method:
Iterator<T> it = list.iterator();   ...

8. How can I improve Java2D performance of TextLayout.draw(..)    stackoverflow.com

I'm using the Java2D TextLayout class together with a LineBreakMeasurer and an AttributedCharacterIterator to draw a piece of text into a box. The text is wrapped. Profiling shows me that the code ...

9. Relative Performance of Java's Garbage First (G1) Garbage Collector?    stackoverflow.com

Does anyone know of any performance benchmarks of Java's new Garbage First (G1) Garbage Collector (as compared to the "old" GCs)? In terms of GC pause times, Sun states that G1 ...

10. Does the placement of a try-catch block affect performance?    stackoverflow.com

Does the placement of a try-catch block affect performance? EXAMPLE 1: try-catch block inside of the while-loop

while (true) {
    try {
        // ...

11. fastest way to compare two Set in Java    stackoverflow.com

I am trying to optimize a piece of code which compares elements of list. Eg.

public void compare(Set<Record> firstSet, Set<Record> secondSet){
    for(Record firstRecord : firstSet){
      ...

12. Any difference in the performance of these two Java segments?    stackoverflow.com

I'm curious to know if either of these two Java method invocations will behave differently at all in terms of processor time, memory allocation and/or garbage collection.

SomeObject myObj = new SomeObject();
myObj.doSomething();
vs.
new ...

13. Java GPU programming    stackoverflow.com

Is it possible to do GPU programming in Java ? I mean without using native libraries. And how much of a performance improvement can one expect when we switch over to gpu's ? Edit: I ...

14. Performance Implication of doing frequent calls to totalMemory()/freeMemory() for java.lang.Runtime?    stackoverflow.com

I have to frequently check the memory usage by an application - it right does it every 60 seconds using java.lang.Runtime.freeMemory()/java.lang.Runtime.totalMemory() What if I do the above say every 5 seconds - ...

15. How can I speed up Sonar's package design analysis?    stackoverflow.com

I maintain the build process for a large (> 500,000 LOC) Java project. I've just added a Sonar analysis step to the end of the nightly builds. But it ...

16. What's could be the right test case for evaluating assignment operators performance vs concrete operations?    stackoverflow.com

Simply I am trying to figure out what is the fast way to assign a value like

somevar+=1;
or
somevar=somevar+1;
time ago in situations with text instead of integers I encountered some performance ...

17. Java Performance: Getting and Setting Lists    stackoverflow.com

Can anyone tell me if either of these will perform better than the other compiled under Java 1.6? Assume MyObject is a class with one field called listField that has ...

18. Most efficient way to parse this with the Java Scanner library?    stackoverflow.com

I'm trying to parse a section of a large file with Java's Scanner library, but I'm having a hard time trying to determine the best route to parse this text.

SECTOR ...

19. Why is this bit of code taking so long?    stackoverflow.com

I'm doing what seems like a simple read from a data file, and it's taking for fricking ever. (And by that, I mean 300ms.) This is the code in question:

BufferedReader f ...

20. Writing hashCode methods for heterogeneous keys    stackoverflow.com

I have a Java HashMap whose keys are instances of java.lang.Object, that is: the keys are of different types. The hashCode values of two key objects of different types are likely ...

21. Unix - Problems with Game Speed After Transfer    stackoverflow.com

I created a Java game application in Eclipse yesterday. I transferred the files over to my school Unix account with Filezilla. Today, I'm in the school lab testing the game inside ...

22. How can I distinguish between "run all tests" and "run just this test"?    stackoverflow.com

I have tests which run very slow, say a test which exports a large database to test the exporting code for memory leaks. I'd like to have these tests in my ...

23. How to store millions of Double during a calculation?    stackoverflow.com

My engine is executing 1,000,000 of simulations on X deals. During each simulation, for each deal, a specific condition may be verified. In this case, I store the value (which is ...

24. way of calling a function    stackoverflow.com

I was trying to make an API. I just wanna hide all details from end programmer. I also want to provide them number of options to call a function.For example I have ...

25. books/references for code for performance in java    stackoverflow.com

can you please suggest any books/references(other than listed below) for a developer who is gonna develop highly scalable system in java? I know these books cover performance relates topics: effective java,va Concurrency ...

26. java webstart extremely slow    stackoverflow.com

I have to deploy a Java application via Java Webstart. Webstart downloads the application jar and library jars needed, then after everything was downloaded there is a 50 second delay before ...

27. Using { } to segment large blocks of code to improve code-readability - Good practice?    stackoverflow.com

I'm considering the option of using anonymous { } code blocks to logically distinguish "code blocks" inside the same method call, something that (theoretically) should improve readability of the code. I'm wondering ...

28. Is there a way to reduce startup time of a console Java application?    stackoverflow.com

I noticed that the startup time of a minimal console application in Java is slightly more than 100 ms on my machine compared to 1 ms of an equivalent C application. ...

29. AIR nativeprocess performance    stackoverflow.com

Is AIR nativeprocess able to receive message from Java program and process every line of message as fast as possible in milliseconds? Does it has a miss read or delay?

31. Java vs. C Simple Performance Test    stackoverflow.com

im running a simple loop that prints out the iterator (i) for 1.000.000 times in both java and c. im using netbeans and visual studio respectively. i dont care about precision but at ...

32. How to detect Internet connection speed with Java?    stackoverflow.com

In my Java app, how do I detect how fast the Internet connection speed is ? For instance, I use AT&T Fast DSL at home, I wonder if there is a ...

33. Floating-point data type for highest performance in J2ME    stackoverflow.com

I want to use floating-point numbers in my J2ME (MIDP 2.0) program.
I don't need high precision, so I'm considering choosing float type. However, it seems to me that I read a Java ...

34. Java Multi Link Checker Spider - Improvements needed!    stackoverflow.com

I have following working code (changed here and there so you use your brain when you copy and paste it). I'd like to improve it so it detects all pages that ...

35. Best way of stopping java optimising away a method call when performance testing    stackoverflow.com

Im doing some performance optimising on some code, and I've got two ways of doing a calculation. I've got a simple test harness:

    long start, end;
    ...

36. Does use of final keyword in Java improve the performance?    stackoverflow.com

In Java, we can see lots of places where final keyword can be used but we are not used to it. For eg.

String str = "abc";
System.out.println(str);
In above case str can be ...

37. Java try/catch performance, is it recommended to keep what is inside the try clause to a minimum?    stackoverflow.com

Considering you have code like this:

doSomething() // this method may throw a checked a exception
//do some assignements calculations
doAnotherThing() //this method may also throw the same type of checked exception
//more calls to ...

38. Time performance    stackoverflow.com

Hi I have a question that this is my class which for each "n" will get the average time for it. also the method that I want to take its performance has T(n)= ...

39. Performance Comparison of Stored Procedure written in Pl/SQL vs. Java    stackoverflow.com

After going through the discussion here I have one more question now. Lets assume, there is an enterprise level application with million of user base and with millions of transaction each ...

40. BigO running time on some methods    stackoverflow.com

Ok, these are all pretty simple methods, and there are a few of them, so I didnt want to just create multiple questions when they are all the same thing. BigO ...

41. Why is System.out.println so slow?    stackoverflow.com

Is this something common to all programming languages? Doing multiple print followed by a println seems faster but moving everything to a string and just printing that seems fastest. Why? EDIT: ...

42. real examples what is latency-driven or performance-driven application in java    stackoverflow.com

Could you please give me a real example what is latency-driven or performance-driven application ? Both have what differences , what requirement in design system in java ? Thanks.

43. Why is TOAD faster than my java code?    stackoverflow.com

I want to execute a select query and be able to get the count of the results, without using "COUNT(*)", like TOAD does. The concept is to give the option to ...

44. Performance of Java enums    stackoverflow.com

I was thinking about using enum type to manage i18n in a Java game I'm developing but I was curious about performance issues that can occur when working with enums that ...

45. Creating Performance Counters in Java    stackoverflow.com

Does anyone know how can I create a new Performance Counter (perfmon tool) in Java? For example: a new performance counter for monitoring the number / duration of user actions. I ...

46. Synthetic accessor method problem    stackoverflow.com

I've made some new warning settings in eclipse. With these new settings I'm facing a strange warning. After reading I got to know what it is but couldn't find a way ...

47. Cluster thousands of text documents in java    stackoverflow.com

Is there efficient way clustering text documents? I thought about K-Means but it seems to be too time consuming. Can somebody provide me with an efficient method?

48. Do running times match with O(nlogn)?    stackoverflow.com

I have written a class(greedy strategy) that at first i used sort method which has O(nlogn)

Collections.sort(array, new SortingObjectsWithProbabilityField());
and then i used the insert method of binary search ...

49. Alternatives to FastDateFormat for efficient date parsing?    stackoverflow.com

Well aware of performance and thread issues with SimpleDateFormat, I decided to go with FastDateFormat, until I realized that FastDateFormat is for formatting only, no parsing! Is there an alternative to FastDateFormat, ...

50. Java beginner: does casting result in lower performance by any mean?    stackoverflow.com

when I create Animal x=new Dog(); and I want to use Dog functions, I would have to cast right ? ((Dog)x).bark(); so let's say I would use this many times in ...

51. Slowing process creation under Java?    stackoverflow.com

I have a single, large heap (up to 240GB, though in the 20-40GB range for most of this phase of execution) JVM [1] running under Linux [2] on a server with ...

52. Benchmarking Java programs    stackoverflow.com

For university, I perform bytecode modifications and analyze their influence on performance of Java programs. Therefore, I need Java programs---in best case used in production---and appropriate benchmarks. For instance, I already ...

53. Little Java perfomance question    stackoverflow.com

Just curious, which code is more effective:

if (myClass.getSomeValue() != myValue) myClass.setSomeValue(myValue);
or simply
myClass.setSomeValue(myValue);
, where getSomeValue() and setSomeValue(...) are simple getter-setter pair? It's clear, then second will be faster in case of .equals() ...

54. Macro Benchmarks for Java    stackoverflow.com

I'm looking for Java applications and appropriate (macro) benchmarks for them. For instance, I already use PolePosition to benchmark the performance of HyperSQL. Benchmarks based on JBench, JUnitBenchmarks, and similiar tools ...

55. Performance drag of Java assertions when disabled    stackoverflow.com

Code can be compiled with assertions in it and can be activated/deactivated when needed. But if I deploy an app with assertions in it and those are disabled what is ...

56. Comparing Performance of int and Integer    stackoverflow.com

Which one is best in programming - int or Integer ? Especially whenever both are doing the same task ? I am writing an application in java. In most of the places ...

57. StringBuilder/StringBuffer vs. "+" Operator    stackoverflow.com

I'm reading "Better, Faster, Lighter Java" (by Bruce Tate and Justin Gehtland) and am familiar with the readability requirements in agile type teams, such as what Robert Martin discusses in his ...

58. Which is faster in java    stackoverflow.com

  1. Which one is faster in Java? a. for(int i = 100000; i > 0; i--) {} b. for(int i = 1; i < 100001; i++) {}
  2. Which one is faster in Java? a. Math.max(a,b); b. (a>b)?a:b
...

59. Java Performance History    stackoverflow.com

I wonder if there is some resource on the web where the different versions of the Sun Java VM are compared by speed. Something like the PyPy speed timeline would ...

60. How to improve Guice performance at startup    stackoverflow.com

Ok, I know my computations are not objective and so on, but anyway, I hate to wait so much time when performing my unit-tests: My guice swing application takes about 7 seconds ...

61. Tuning GC for Java audio application    stackoverflow.com

I've noticed that when playing audio in java, MarkSweepCompact stage in gc is too long and results in short periods of silence, which is unacceptable. So I need to use a ...

62. Is this an accurate performance test?    stackoverflow.com

I'm trying to test if switch statements execute faster than conditionals. The only thing is this is timing quantity instead of actual faster performance. What could I do to ...

63. Is there a performance overhead to a private inner class in Java?    stackoverflow.com

When I have inner classes with private methods or fields the compiler has to create synthetic package-protected accessor methods to allow the outer class to access those private elements (and vice-versa). To ...

64. high performance function for date arithmetic    stackoverflow.com

I need to write the high performance function which calculates the new datetime based on given datetime and timeshift. It accept 2 arguments:

  1. String, representing the date in format YYYYMMDDHHmm
  2. Integer, ...

65. How big class hierarchy influence on java performance?    stackoverflow.com

I have class that extends another class, that extend another class.. and so on. How slow (in percent) class with 100-level hierarchy level will work, then class with 10-level hierarchy level?

66. Java performance multi-core testing environment    stackoverflow.com

I am interested in learning as much as i can about tuning a multi-threaded java server on a multi-core machine. I wanted to write some test servers that i ...

67. Java performance issues    stackoverflow.com

I'm in the process of benchmarking an app i've written. I ran my app through the benchmark 10 times in a loop (to get 10 results instead of only 1). Each ...

68. which is faster?    stackoverflow.com

I was wondering which of the following would execute faster, just out of curiosity. The language is Java.

int num = -500;
int num2 = 0;

while( Math.abs(num) > num2 )
   ...

69. Java Instrumentation - any performance degradation?    stackoverflow.com

Does using Java Instrumentation decrease the performance of the JVM running it in any way? I'm using it for getting the (shallow) size of an object, and I'm wondering ...

70. Are there any performance differences between singly- and doubly-linked lists?    stackoverflow.com

Our homework assignment asks us to prove that the Java LinkedList implementation is doubly-linked and not singly-linked. However, list operations such as adding elements, removing elements, and looking elements up seem ...

71. Can using non primitive Integer/ Long datatypes too frequently in the application, hurt the performance?    stackoverflow.com

I am using Long/Integer data types very frequently in my application, to build Generic datatypes. I fear that using these wrapper objects instead of primitive data types may be harmful for ...

72. java Tigase Perforamnce    stackoverflow.com

Why Tigase Server can reach so many connections? http://www.tigase.org/content/tigase-load-tests-again-500k-user-connections Could I reach 100,000 connections hypothetically with Netty?

73. Will there be any performance difference in following code?    stackoverflow.com

I want to know whether there is a performance difference in following two code blocks 1>

 if(name == null) {
    //something
    }

    ...

74. PDFBox - options to increase the performance    stackoverflow.com

I have 2 questions regarding PDFBox library (JAVA):

  1. I have just started using PDFBox library and though it's working well, I couldn't help noticing that it runs slower than ITEXT (the other pdf ...

75. How to calculate the running time of my program?    stackoverflow.com

Possible Duplicate:
How do I time a method's execution in Java?
I wrote a program and now I want to calculate the total running time of ...

76. Fast way to find exponent of nearest superior power of 2    stackoverflow.com

If I have a number a, I want the value of x in b=2^x, where b is the next power of 2 greater than a. In case you missed the tag, this ...

77. Java - Huge Data Retrival    stackoverflow.com

I have a requiement where in one of the report , I need to fetch around 10 Million Records from the database and Trasfer them to Excel. The application is Client-Server model ...

78. Java Big-O performance    stackoverflow.com

I'm still relatively new in regards to Big O notation/performance, so I have a question about performance for my class project. I have about 5000 game objects formed from reading a text ...

79. Designing high-performance State Machine in Java    stackoverflow.com

I am in the process of starting to write a Java library to implement high-performance Finite State Machines. I know there are a lot of libraries out there, but I want ...

80. auto-compile, auto-run, auto-compare result in Java    stackoverflow.com

dear all, i am new in Java and at now i am trying to develop an application under Java to do such these things: assumption: there is a file contains source code in Java. let's ...

81. What is the most efficient way to access particular elements in a SortedSet?    stackoverflow.com

I want to use a collection that is sorted, but one in which I can access elements by index, i.e. I want something that has characteristics of both a Set and ...

82. In Java, is there a performance difference between new and local?    stackoverflow.com

In C and C++ I know that there could be a huge difference in performance between instantiating objects on the stack vs. using 'new' to create them on the heap. Is this ...

83. Using HtmlUnit to mimic a User, Errors    stackoverflow.com

I have a website and I've been trying to gather statistical data (mostly page render times) for the end user, for example: login time, search result time. I need something to ...

84. download with java code is really slow    stackoverflow.com

i wrote a bit of code that reads download links from a text file and downloads the videos using the copyURLToFile methode from apaches commons-io library and the download is really ...

85. Is there any way improve the performance of FlyingSaucer?    stackoverflow.com

I've followed this article to use FlyingSaucer to convert XHTML to PDF and it's brilliant but has one major downfall... it's ridiculously slow! I'm finding that it takes between 1 ...

86. Efficient way to create sub set from an existing one?    stackoverflow.com

I'm searching for a good solution to create a subset from a existing set. For example, i have a set with 1000 Objects (or whatever..) and i need to make a ...

87. Work with Subversion in Java, performance is VERY important    stackoverflow.com

I wanted to work with Subversion in Java. The most important thing for me is performance. I want to be able to run these commands:

  • SVN Commit
  • SVN Status
  • SVN Add
  • SVN Cat
Currently I run ...

88. How could this Java method be improved?    stackoverflow.com

I am parsing XML files and I have several methods similar to:

public static Integer getInteger(Object integer) {
  if (integer == null) {
     return 0;
  }

 ...

89. Strange performance issues of Java VM    stackoverflow.com

Look please at this code:

public static void main(String[] args) {
    String[] array = new String[10000000];
    Arrays.fill(array, "Test");
    long startNoSize;
    ...

90. Java: JOOQ persistence framework performance and feed back    stackoverflow.com

I've stumbled over a nice SQL builder framework, called JOOQ. BTW, in Russian JOOQ sounds like noun meaning "bug" (as an insect), "beetle" ;) If you have any feedback ...

91. Reducing the number of IOPS - Performance improvement question    stackoverflow.com


so I have an application that is processing a large text document which is composed of many logical documents. Say for eg it has 200,000 logical documents. Right now I read ...

92. Improving performance of preprocessing large set of documents    stackoverflow.com

I am working on a project related to plagiarism detection framework using Java. My document set contains about 100 documents and I have to preprocess them and store in a suitable ...

93. optimize this java code?    stackoverflow.com

I have a quartz scheduler job which scans a directory every 10 seconds and convert all pcl files to pdf files. Here I put part of the code which scans the directory ...

94. how to improve java code based on this stats?    stackoverflow.com

I have a web application which converts some PCL files to PDF by running a scheduler task every 10 seconds. Each time it takes max. 20 pc files from a directory ...

95. Calender API in Java:Performance    stackoverflow.com

Following code is giving very bad performance. I came to know that there is performance problem with Calender API

 long startInMilliSec = measFileCreationTime_OssTime;
          ...

96. Strange performance results of simple Java program    stackoverflow.com

Take a look at the following code in Java:

long l = System.currentTimeMillis();
int[] arr = new int[2];
for (int i = 0; i < arr.length; i++) {
  for (int j = 0; ...

97. Java Fast Track How to fast track on my Java Project?    stackoverflow.com

I am a .NET professional, recently pushed into a swing based project and I have tight dead lines. Kindly suggest some resources to gain fast track knowledge or any book? Anywhere I can ...

98. Set Agent Classpath in - The Grinder Java    stackoverflow.com

How do I set the agent classpath for the java grinder?

99. Length ( number of methods ) of a class code and performance    stackoverflow.com

What kind of dependency is between number of methods, or length of source code of a class to performance (memory usage, speed of execution )? It is better to create as ...

100. TLS Performance in Java?    stackoverflow.com

I see the TLS implementation in Java doesn't use JNI at all. A native implementation for TLS should be faster IMO. So I guess maybe JNI itself is too expensive, compared ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.