Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Poor Java swing performance on older PC
New Posts  All Forums:Forum Nav:

Poor Java swing performance on older PC

post #1 of 16
Thread Starter 
I've created a Java application for a business using swing on Java 1.7. The application runs excellent on my FX-8350 and on a i3 based system. But it runs so bad on the machine bought for the business, it's just scrolling that is really bad, spec below: -

CPU: Pentium 4 3.2 Ghz
RAM: 2GB
GPU: NVidia GeForce 210
OS: Windows 7 32-Bit

I know it is nothing to do with the application being poorly coded, as to test this, I created a simple JPanel surrounded with a scrollpane with gridlines drawn on the JPanel.

The scrolling is soooo slow and jerky. Whereas surfing the web and windows explorer scrolling is fine.

I honestly thought the spec of the above machine would be sufficient.

Is there anything I can do to make this run better? Woud installing XP be the better option?

I shall provide code if you really think it would help you answer, but it will take some time to get it as I don't have it on this machine. I thought I would just get some initial thoughts from you guys first.

Many thanks
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
post #2 of 16
Java is a massive memory hog at the best of time and I wouldn't have recommended running Win7 of 2GB RAM as it is (sure, it can run on 2GB, but since RAM is cheap it's worth building any new machine with at least 4GB). so your first issue is the lack of RAM.

Next you have a really old chipset which isn't all that great at multi-tasking by todays standards. I'd have recommended at least a core2duo. Since your Swing app is entirely software rendered, the graphics card is completely irrelevant (you could have run this off of an onboard graphics chip set quite happily) - this is also the reason I suggested a P4 might not be up to scratch for this project.

The main thing though is definitely the RAM.
post #3 of 16
Thread Starter 
Yeah, this sounds logical. My friend has an old E8400 Core 2 laying around, I may ask him for this. It's the same socket, but I need to investigate whether the motherboard will take it, I don't have the model number with me.
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
post #4 of 16
Nice breaded cat avatar btw thumb.gif is that one of your pets or a random gif you found online?
post #5 of 16
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

Nice breaded cat avatar btw thumb.gif is that one of your pets or a random gif you found online?

No, just one I found online. I do need to bread a cat at some point. I don't own one myself. Friends have not been too keen on me breading their cats. And just think I'm strange for wanting to. They're probably right!

I reversed the gif, cos it looks funnier... lachen.gif

Is that your cat in your avatar? I like it.
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
post #6 of 16
Quote:
Originally Posted by JoeChamberlain View Post

No, just one I found online. I do need to bread a cat at some point. I don't own one myself. Friends have not been too keen on me breading their cats. And just think I'm strange for wanting to. They're probably right!

I reversed the gif, cos it looks funnier... lachen.gif

Is that your cat in your avatar? I like it.

Not my cat in my avatar, but I do own two cats. In fact seeing your avatar has inspired my to bread my own cats (thankfully the eldest tends to put up with a lot before she sulks off)
post #7 of 16
Thread Starter 
LOL. It would be funny if this thread got locked for being off topic. Maybe I should start a breaded cats thread! biggrin.gif
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
post #8 of 16
Something ain't right because those specs should be more than enough to run a simple swing panel.

Is the JRE up to date on that computer?
When you are running it, maybe you can open your task manager (ctrol+shift+esc) to check the performance tab if there is any ram available to make sure it's not using swap, and to see if the CPU is at 100% or still has room to work with.

DEFINITELY that should run properly on such machine. I can run swing on a n270 atom with 1gb ram without problems which is a weaker CPU, GPU and less ram than you rig.
post #9 of 16
Quote:
Originally Posted by EduFurtado View Post

Something ain't right because those specs should be more than enough to run a simple swing panel.

Is the JRE up to date on that computer?
When you are running it, maybe you can open your task manager (ctrol+shift+esc) to check the performance tab if there is any ram available to make sure it's not using swap, and to see if the CPU is at 100% or still has room to work with.

DEFINITELY that should run properly on such machine. I can run swing on a n270 atom with 1gb ram without problems which is a weaker CPU, GPU and less ram than you rig.

Is your Atom a weaker CPU though? It's quite significantly newer than a Pentium 4 and comparing CPU frequencies is a pretty inaccurate gauge of performance across different architectures.

Plus what OS are you running on your Atom?
post #10 of 16
Thread Starter 
Will double check tonight but I'm sure ram capacity is fine. I think I still had a gig available when running the application. I've tried lower resolutions, overclocking the GPU and I can't overclock the CPU due to the locked OEM bios.

The JRE is the latest available one, I downloaded straight from the internet a couple of days ago. It is also a fresh install of Windows with all the latest updates applied. Also I have tried turning on OpenGL acceleration by calling: -

System.setProperty("sun.java2d.opengl", "True");

I've heard people mention that the 2006 BIOS that I have on the machine (that I can't seem to update) is causing trouble for the performance of Windows 7? Is this possible?

My thoughts are the CPU still as suggested, but I am still concerned that a 3.2 Ghz Pentium 4 struggles with a simple Java swing application. I'm reluctant to tell the owner of the business that they need a more powerful PC when I suggested buying this PC in the first place, I thought it was all they would need.

I shall post a example of Java code that performs sluggish on the machine when I have time.

Thanks for all your suggestions thus far.
Edited by JoeChamberlain - 5/28/13 at 8:39am
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
For Gaming
(18 items)
 
For Working
(8 items)
 
For Serving
(8 items)
 
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4.6 Ghz ASUS M5A97-PRO Sapphire R9 290X Tri-X 4GB @ 1170/1475 8GB Corsair Vengeance Blue LP DDR3 2133 Mhz 
Hard DriveHard DriveOptical DriveCooling
Crucial M4 SSD 128 GB Toshiba SATA III 2TB SAMSUNG DVDRW Corsair H60 
OSMonitorKeyboardPower
Windows 10 Pro 64 Bit Asus MG279Q 27" FreeSync WQHD 144hz IPS Corsair K70 LUX RGB Cherry MX Red Corsair CX750M 
CaseMouseAudioAudio
Cooler Master Elite 430 Corsair Vengeance M65 Alesis iO2 Express Audio Interface Wharfedale Pro Diamond 8.2 Active Studio Monitors 
Audio
Corsair Vengeance 1500 v2 7.1 Dolby Headset 
CPUGraphicsRAMHard Drive
Intel Core i7-3740QM CPU @ 2.70 Ghz NVidia Quadro K1000M 2GB 32GB DDR3 500GB 7200RPM 
Optical DriveOSMonitorOther
Slot DVDRW Windows 7 64-Bit 1080p Built in Display Dell Precision M4700 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Poor Java swing performance on older PC