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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
Just a quick question what would be more expensive in Java?
double test = 5;
double test1 = 5;
or
double test = 5;
...
|
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(); ...
|
|
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 ... |
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 ... |
Does the placement of a try-catch block affect performance?
EXAMPLE 1: try-catch block inside of the while-loop
while (true) {
try {
// ...
|
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){
...
|
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 ...
|
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 ... |
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 - ... |
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 ... |
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 ... |
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 ... |
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 ...
|
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 ...
|
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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. ... |
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?
|
|
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 ... |
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 ... |
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 ... |
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 ... |
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;
...
|
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 ... |
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 ...
|
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)= ... |
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 ... |
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 ... |
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: ... |
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.
|
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 ... |
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 ... |
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 ... |
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 ... |
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?
|
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 ... |
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, ... |
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 ... |
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 ... |
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 ... |
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() ... |
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 ... |
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 ... |
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 ... |
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 ... |
- Which one is faster in Java?
a.
for(int i = 100000; i > 0; i--) {}
b. for(int i = 1; i < 100001; i++) {}
- Which one is faster in Java?
a.
Math.max(a,b);
b. (a>b)?a:b
... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
I need to write the high performance function which calculates the new datetime based on given datetime and timeshift. It accept 2 arguments:
- String, representing the date in format YYYYMMDDHHmm
- Integer, ...
|
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?
|
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 ... |
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 ... |
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 )
...
|
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 ... |
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 ... |
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 ... |
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?
|
I want to know whether there is a performance difference in following two code blocks
1>
if(name == null) {
//something
}
...
|
I have 2 questions regarding PDFBox library (JAVA):
- 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 ...
|
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
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 ... |
I am parsing XML files and I have several methods similar to:
public static Integer getInteger(Object integer) {
if (integer == null) {
return 0;
}
...
|
Look please at this code:
public static void main(String[] args) {
String[] array = new String[10000000];
Arrays.fill(array, "Test");
long startNoSize;
...
|
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 ... |
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 ...
|
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 ... |
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 ... |
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 ... |
Following code is giving very bad performance.
I came to know that there is performance problem with Calender API
long startInMilliSec = measFileCreationTime_OssTime;
...
|
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; ...
|
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 ... |
How do I set the agent classpath for the java grinder?
|
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 ... |
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 ... |