• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Possible to force my java app to use more CPU utilization?

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
22,077 (6.19/day)
Likes
11,139
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#51
If it has millions of frames, it is. That was just an example where Java is terrible. It comes up frequently when dealing with files that weren't created by Java. Can come up dealing with databases too.
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,729 (4.54/day)
Likes
5,847
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.5Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Corsair H100i V2
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 18.04
Benchmark Scores Benchmarks aren't everything.
#52
If it has millions of frames, it is.
A GIF with millions of frames, huh? If this was a video at 60fps, that would be 277 minutes worth of GIF. It also would be one huge file. :kookoo:
It comes up frequently when dealing with files that weren't created by Java.
I read files that weren't created by Java all the time, however I can deal with the twos compliment bytes. In fact, most of the time I don't need to work with the byte directly but, when I do, I can deal with the twos complimented numbers Java displays. :laugh:
 
Joined
Jan 8, 2017
Messages
2,613 (4.69/day)
Likes
1,805
System Name Good enough
Processor AMD FX-6300 - 4.5 Ghz
Motherboard ASRock 970M Pro3
Cooling Scythe Katana 4 - 3x 120mm case fans
Memory 16GB - 4x4GB A-DATA 1866 Mhz (OC)
Video Card(s) ASUS GTX 1060 Turbo 6GB ~ 2139 Mhz / 9.4 Gbps
Storage 1x Samsung 850 EVO 250GB , 1x 1 Tb Seagate something or other
Display(s) 1080p TV
Case Zalman R1
Power Supply 500W
#53
I don't why this thread turned into an argument about Java. Java was probably one of the first languages designed for corporations by corporations and it shows , that's all there is to it. Not a whole lot of new software is built with Java from the ground up nowadays , sure there is a lot of maintenance to be done on the mountains of software that have been written in the early 2000s so it's usage somewhat skews the reality of things.

Java would literally by my last choice for 2D graphics or any kind of graphics , OP chose the wrong tool for the job , nothing will properly mend that or be worth the effort and hassle.
 
Last edited:

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,729 (4.54/day)
Likes
5,847
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.5Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Corsair H100i V2
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 18.04
Benchmark Scores Benchmarks aren't everything.
#54
Java would literally by my last choice for 2D graphics or any kind of graphics
I would argue that Node.js, Ruby, or PHP are less adequate than Java for rendered graphics but, I'm not disagreeing. Java wouldn't be my go-to for visualizations either, but that isn't to say it can't do it though and choosing to use the right tools inside the ecosystem helps as well. Fighting against a platform doesn't tend to help give you traction and Swing is probably the last thing you want to use.
 
Joined
Jan 8, 2017
Messages
2,613 (4.69/day)
Likes
1,805
System Name Good enough
Processor AMD FX-6300 - 4.5 Ghz
Motherboard ASRock 970M Pro3
Cooling Scythe Katana 4 - 3x 120mm case fans
Memory 16GB - 4x4GB A-DATA 1866 Mhz (OC)
Video Card(s) ASUS GTX 1060 Turbo 6GB ~ 2139 Mhz / 9.4 Gbps
Storage 1x Samsung 850 EVO 250GB , 1x 1 Tb Seagate something or other
Display(s) 1080p TV
Case Zalman R1
Power Supply 500W
#55
I would argue that Node.js, Ruby, or PHP are less adequate than Java for rendered graphics
Thing is Java falls into that grey area of languages that look like can be used for anything unlike those, who are widely recognized as being suitable for a specific set of tasks.
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,729 (4.54/day)
Likes
5,847
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.5Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Corsair H100i V2
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 18.04
Benchmark Scores Benchmarks aren't everything.
#56
Thing is Java falls into that grey area of languages that look like can be used for anything unlike those, who are widely recognized as being suitable for a specific set of tasks.
I know a lot of people who would argue that Node can be used for everything. People have opinions about these things but, at the end of the day, they're all Turing complete languages, each with their own strengths and weaknesses. I mean, at the end of the day if the only thing you care about is performance, you might as well just write it in C and call it a day. Java is very mature, it has a lot of well maintained libraries, and it runs everywhere. Those are things that are valuable to developers. I don't tend to write Java anymore, I usually write Clojure which, at the end of the day, compiles to Java byte code and runs on the JVM. It works for what I typically need and it gives me the ability to tap into any of the Java or Clojure libraries that have been written and put into Clojars or Maven Central.

For example, Google's cloud api library for Java is incredibly well maintained and the devs are very quick to address issues. If you're using something like GCP, that's worth its weight in gold to a business.
 
Joined
May 22, 2015
Messages
3,816 (3.31/day)
Likes
1,409
Processor Intel i5-6600k
Motherboard ASRock Z170 Extreme7+
Cooling Arctic Cooling Freezer i11
Memory 2x8GB DDR4 2400 G.Skill
Video Card(s) EVGA GTX 1060 SC
Storage 128 and 256GB OCZ Vertex4, 500GB Samsung 850 EVO, 1TB Crucial MX300 and 3TB Seagate
Display(s) HP ZR24w
Case Chieftec BX01
Power Supply Seasonic 620W M12
Mouse Logitech G502 Proteus Core
Keyboard G.Skill KM780R
#57
I know a lot of people who would argue that Node can be used for everything. People have opinions about these things but, at the end of the day, they're all Turing complete languages, each with their own strengths and weaknesses. I mean, at the end of the day if the only thing you care about is performance, you might as well just write it in C and call it a day. Java is very mature, it has a lot of well maintained libraries, and it runs everywhere. Those are things that are valuable to developers. I don't tend to write Java anymore, I usually write Clojure which, at the end of the day, compiles to Java byte code and runs on the JVM. It works for what I typically need and it gives me the ability to tap into any of the Java or Clojure libraries that have been written and put into Clojars or Maven Central.

For example, Google's cloud api library for Java is incredibly well maintained and the devs are very quick to address issues. If you're using something like GCP, that's worth its weight in gold to a business.
I almost gave you thumbs up, but you had to say Clojure :D
I'm more of a Scala guy ;)
Java would literally by my last choice for 2D graphics or any kind of graphics , OP chose the wrong tool for the job , nothing will properly mend that or be worth the effort and hassle.
What if you had to do cross-platform graphics?
At the end of the day, it gets the job done. Ask Minecraft ;)
Plus, in the age of microservices, you can take advantage of Java's TTM and rewrite later if you need to squeeze more out of it. I mean, the OP seems to be doing just some prototyping atm.
 
Joined
Mar 24, 2010
Messages
4,725 (1.55/day)
Likes
951
Location
Visca la Terra Lliure!
System Name Oh the name!
Processor i7 7700K
Motherboard MSI Z270 Xpower
Cooling EK 360 Extreme
Memory 16Gb G.Skill TridentZ 3866
Video Card(s) nVidia 1080 Ti Flanders Edition
Storage 1 Intel PCIE SSD750, 2 Sam 840Evo 1TB SSD, WD Black 2TB, Toshiba 3TB
Display(s) Acer Predator X1 (32")
Case Rajintek Paean
Audio Device(s) onboard
Power Supply Corsair AX860
Mouse Mad Catz Pro X
Keyboard Corsair K70
Software W10Pro
#58
All i like about Java is that when I detect it, I reformat. (just kidding, but when I detect it, I go into hunter mode: What fucking application did bring this shit?))
 
Joined
May 22, 2015
Messages
3,816 (3.31/day)
Likes
1,409
Processor Intel i5-6600k
Motherboard ASRock Z170 Extreme7+
Cooling Arctic Cooling Freezer i11
Memory 2x8GB DDR4 2400 G.Skill
Video Card(s) EVGA GTX 1060 SC
Storage 128 and 256GB OCZ Vertex4, 500GB Samsung 850 EVO, 1TB Crucial MX300 and 3TB Seagate
Display(s) HP ZR24w
Case Chieftec BX01
Power Supply Seasonic 620W M12
Mouse Logitech G502 Proteus Core
Keyboard G.Skill KM780R
#59
All i like about Java is that when I detect it, I reformat. (just kidding, but when I detect it, I go into hunter mode: What fucking application did bring this shit?))
It's probably not the best thing to have on your home PC, but it's on virtually every server out there. It powers useful stuff as Apache Kafka or Spark.
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,729 (4.54/day)
Likes
5,847
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.5Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Corsair H100i V2
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 18.04
Benchmark Scores Benchmarks aren't everything.
#60
I almost gave you thumbs up, but you had to say Clojure :D
I'm more of a Scala guy ;)
Ehhh. I've had enough of OO and the havoc it can wreak. Clojure(Script,) has the added benefit of being able to compile to JavaScript too which is nice for the browser (I personally really like Reagent.)

What if you had to do cross-platform graphics?
At the end of the day, it gets the job done. Ask Minecraft ;)
It's a big reason why I suggested LWJGL if the OP is sticking with Java and Minecraft actually can run really well despite being on Java.
It's probably not the best thing to have on your home PC, but it's on virtually every server out there. It powers useful stuff as Apache Kafka or Spark.
Good enough for large scale applications running on servers, but not okay for workstations? Interesting. ;)
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
22,077 (6.19/day)
Likes
11,139
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#61
It's a big reason why I suggested LWJGL if the OP is sticking with Java and Minecraft actually can run really well despite being on Java.
It really doesn't. It runs a lot better on the other platforms it has been ported to. Even the UWP version.
 
Joined
May 22, 2015
Messages
3,816 (3.31/day)
Likes
1,409
Processor Intel i5-6600k
Motherboard ASRock Z170 Extreme7+
Cooling Arctic Cooling Freezer i11
Memory 2x8GB DDR4 2400 G.Skill
Video Card(s) EVGA GTX 1060 SC
Storage 128 and 256GB OCZ Vertex4, 500GB Samsung 850 EVO, 1TB Crucial MX300 and 3TB Seagate
Display(s) HP ZR24w
Case Chieftec BX01
Power Supply Seasonic 620W M12
Mouse Logitech G502 Proteus Core
Keyboard G.Skill KM780R
#62
Ehhh. I've had enough of OO and the havoc it can wreak. Clojure(Script,) has the added benefit of being able to compile to JavaScript too which is nice for the browser (I personally really like Reagent.)
Yeah, functional solves many problems more elegantly. It's just that lisp syntax has never jived well with me, that's all.


It's a big reason why I suggested LWJGL if the OP is sticking with Java and Minecraft actually can run really well despite being on Java.
Java's problem is not that it doesn't run well. In some benches it can match C for speed. Its problem is it needs a lot more memory than other solutions and it sometimes takes a while for JIT to kick in.

Good enough for large scale applications running on servers, but not okay for workstations? Interesting. ;)
Workstations wouldn't have a problem (other than having to juggle JREs), that's why I said home PC.
 
Joined
Jan 13, 2015
Messages
92 (0.07/day)
Likes
9
#63
Java would literally by my last choice for 2D graphics or any kind of graphics , OP chose the wrong tool for the job , nothing will properly mend that or be worth the effort and hassle.
I took a course in Java when I was in college. It was a great language to learn the concepts of OOP. Most of what I'm doing is for proof of concept, and not so much for professional consultation purposes. There's plenty of resources available on the Web to answer just about any question you have about Java. Java is also similar in syntax to other high level languages and I think that's a bonus. I'm now dabbling in C# as per a recommendation on a prior post. I'm finding the syntax very similar to Java.

P.S. I'm no longer receiving email notifications for new posts in this thread...
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
22,077 (6.19/day)
Likes
11,139
Location
IA, USA
System Name BY-2015
Processor Intel Core i7-6700K (4 x 4.00 GHz) w/ HT and Turbo on
Motherboard MSI Z170A GAMING M7
Cooling Scythe Kotetsu
Memory 2 x Kingston HyperX DDR4-2133 8 GiB
Video Card(s) PowerColor PCS+ 390 8 GiB DVI + HDMI
Storage Crucial MX300 275 GB, Seagate 6 TB 7200 RPM
Display(s) Samsung SyncMaster T240 24" LCD (1920x1200 HDMI) + Samsung SyncMaster 906BW 19" LCD (1440x900 DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay
Audio Device(s) Realtek Onboard, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse SteelSeries Sensei RAW
Keyboard Tesoro Excalibur
Software Windows 10 Pro 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
#64
C# exists because Sun sued Microsoft over using JVM in J++ (Microsoft adaptation of Java). Microsoft went on to create the .NET Framework and J# (literally Java on .NET) and C# (C++ on .NET). If you can hunt down a version of Visual Studio 2005, that was the last to have J#. C# was so popular that they decided to axe support for J#.
 
Top