In a game I'm making, I went to check why my FPS was throttling on my laptop in Java VisualVM. (I develop on my computer, which has better specs). What I noticed was that the function 'render()' in my Tiles class was hogging up most of my CPU time on my laptop. (See this picture for laptop CPU times)
Next, I went to check if this was the case on my desktop as well, since there is no FPS throttle there. The results on my desktop were as follows: (Desktop CPU times)
What struck me as odd, was that on my laptop, rendering the tiles seems to hog most of the CPU time, whereas on my desktop, the game loop itself takes up most CPU time.
I'm struggling to find an explanation for this. Could it be a hardware difference? And how is it that the render() method takes up more CPU time than the actual game loop (which it is a part of)?
Laptop specs:
CPU: Intel i7-7500U (4 core 2.70Ghz)
GPU: Intel HD Graphics 620 (Display) NVidia GeForce 940MX (Render)
RAM: 8GB
Desktop specs:
CPU: Intel i5-4460 (4 core 3.2Ghz)
GPU: NVidia GeForce GTX 760
RAM: 8GB
Related
I am trying to run a Java program which finds Poly divisible numbers. However, I have found that it is significantly slower on my Windows computer in comparison to the speed it runs at on a Macbook Pro.
There was another question I found here: Java code running faster on Mac with slower processor than on my Windows computer? with a similar problem, however it has no conclusive answer to why it is slower.
Do you know any reason why this may be and how this could be fixed.
Windows Specs:
i7 7700k # 4.2 GHz (4 Cores, 8 threads)
16 GB RAM # 3000MHz. (DDR4)
Timings: https://gist.github.com/JosephBywater/f79f5e8277d148c26804c85c2c6a399a
Macbook Pro Early 2015
Intel i5 (unknown model, possibly i5 5257U) # 2.7 GHz
8 GB RAM # 1867 MHz. (DDR3)
Timings: https://gist.github.com/oliverdunk/ad3dd134b653c43c9928
Code https://github.com/oliverdunk/Polydivisbles
I had implemented these solution for webcam capture in java (Sarxos API, JavaCv, Lti-Civil, OpenIMAJ, JMF) and tested on various processors i3 ( 4 GB RAM), i5 (4 GB RAM) , Core 2 Duo and Atom with different webcams.
I had noticed that in every system FPS as well as Refresh rate gets changed
I had been trying with Logitech C920 webcam as external cam.
I don't get why these changes happens. When I test Webcam with Logitech WebCam software It's performance of webcam preview remains constant in all systems even with high resolutions. On low resolution above mentioned Java API works well but when i try with high resolution such as 1920x1080 or 1600x1200 webcam preview comes with huge amount of lagging in low processors such as core 2 duo and atom processors.
Please provide your suggestion on this issue ?
Thanks
I have 2 Java programs. Each has a memory region, and programs pass messages to each other's memory regions. Java program checks its memory region with ScheduledExecutorService at a certain period of time, i.e. 5 miliseconds. Then it does some conversion and prints the message to screen. Two programs run succesfully and they print messages to screen ( I have implemented all JNI related things and programs run succesfully). The problem is that when I start these programs on my computer (windows 8, 64 bits, 8gb ram, 2.67 Ghz i5 processor) they run really fast. However, when I run these exactly same programs with exactly same native c++ library where I handle shared memory related works, on a different computer they run slower. The more interesting is that I tried to run them on a both better computer with 32 gb ram, i7 processor and worse computer with 6 gb ram and 64 bits core duo cpu and still they run slower. So another computer with either better or worse features than my computer did not matter on the speed of programs. All I see they run slower on other computers.
Any help is appreciated. Thanks.
does anyone knows how to simulate low ram on an android device?
I want to test my app with low RAM, but the emulator is too slow and i'd like to be able to test it on my HTC one running it only with 512 MB of ram.
Is it possible?
Thanks in advance
The android emulator can run really smooth if you have an Intel CPU on your machine. In order to use to create a smooth emulator, you'll need the following:
1 Install Intel HAXM on your computer. Available here
http://software.intel.com/en-us/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-microsoft
2 Create a new AVD in AVD Manager, and for CPU select Intel Atom (x86)
3 Make sure you check Use Host GPU option
4 Start the emulator. If everything is ok, you should see a message like this
One option would be create a non-swappable application that dynamically uses up main memory to maintain average available free memory ~= 512 Mb. By non-swappable I mean that it should not be swapped out of main memory by the kernel memory-manager at any time. In Windows this is done using a VirtualLock (http://msdn.microsoft.com/en-us/library/aa366895%28VS.85%29.aspx) that prevents a memory region from being swapped out. Not sure how this can be done in Android though...
I made the observation that my java application is running much faster when executed on an AMD processor in contrast to an Intel CPU.
For example my JBoss starts in about 30 seconds on a 3 GHz AMD processor and needs about 60 seconds on a 3 GHz Intel processor with identical disc, RAM and OS?
Has anyone else made this observation? Why is this so?
It depends on the CPU generation as well - clock speed is not everything.
If you set up e.g. an Intel Pentium 4 and an AMD Phenom with the same clock speed, you'll see a large difference in favour of the Phenom.
Update: If you're really curious, use a profiler and post the results.
Other considerations:
Size of processor on-board cache
Bus speed of your motherboard
Cache size of your hard drive
Hard drive RPM and read speed
Bottom line: Unless your configurations are identical besides the chips, and you are trying to asses the performance of a particular technology, you're really comparing apples to oranges.
Are they both running the same architecture? Or is the AMD running a 64-bit OS?
Remember that startup time isn't everything; a 60s startup time probably isn't that bad if the application runs as fast AFTER it's started up.
I've seen 64-bit JDK work much faster than 32-bit one on the same processor. So maybe that's the case.
EDIT: http://java.sun.com/docs/hotspot/HotSpotFAQ.html#64bit_performance. Sorry, I guess I'm wrong.