• 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
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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
13,147 (2.95/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
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
8,925 (3.36/day)
System Name Good enough
Processor AMD Ryzen R9 7900 - Alphacool Eisblock XPX Aurora Edge
Motherboard ASRock B650 Pro RS
Cooling 2x 360mm NexXxoS ST30 X-Flow, 1x 360mm NexXxoS ST30, 1x 240mm NexXxoS ST30
Memory 32GB - FURY Beast RGB 5600 Mhz
Video Card(s) Sapphire RX 7900 XT - Alphacool Eisblock Aurora
Storage 1x Kingston KC3000 1TB 1x Kingston A2000 1TB, 1x Samsung 850 EVO 250GB , 1x Samsung 860 EVO 500GB
Display(s) LG UltraGear 32GN650-B + 4K Samsung TV
Case Phanteks NV7
Power Supply GPS-750C
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
13,147 (2.95/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
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
8,925 (3.36/day)
System Name Good enough
Processor AMD Ryzen R9 7900 - Alphacool Eisblock XPX Aurora Edge
Motherboard ASRock B650 Pro RS
Cooling 2x 360mm NexXxoS ST30 X-Flow, 1x 360mm NexXxoS ST30, 1x 240mm NexXxoS ST30
Memory 32GB - FURY Beast RGB 5600 Mhz
Video Card(s) Sapphire RX 7900 XT - Alphacool Eisblock Aurora
Storage 1x Kingston KC3000 1TB 1x Kingston A2000 1TB, 1x Samsung 850 EVO 250GB , 1x Samsung 860 EVO 500GB
Display(s) LG UltraGear 32GN650-B + 4K Samsung TV
Case Phanteks NV7
Power Supply GPS-750C
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
13,147 (2.95/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
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.
 

bug

Joined
May 22, 2015
Messages
13,210 (4.06/day)
Processor Intel i5-12600k
Motherboard Asus H670 TUF
Cooling Arctic Freezer 34
Memory 2x16GB DDR4 3600 G.Skill Ripjaws V
Video Card(s) EVGA GTX 1060 SC
Storage 500GB Samsung 970 EVO, 500GB Samsung 850 EVO, 1TB Crucial MX300 and 2TB Crucial MX500
Display(s) Dell U3219Q + HP ZR24w
Case Raijintek Thetis
Audio Device(s) Audioquest Dragonfly Red :D
Power Supply Seasonic 620W M12
Mouse Logitech G502 Proteus Core
Keyboard G.Skill KM780R
Software Arch Linux + Win10
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
5,047 (0.98/day)
Location
Iberian Peninsula
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?))
 

bug

Joined
May 22, 2015
Messages
13,210 (4.06/day)
Processor Intel i5-12600k
Motherboard Asus H670 TUF
Cooling Arctic Freezer 34
Memory 2x16GB DDR4 3600 G.Skill Ripjaws V
Video Card(s) EVGA GTX 1060 SC
Storage 500GB Samsung 970 EVO, 500GB Samsung 850 EVO, 1TB Crucial MX300 and 2TB Crucial MX500
Display(s) Dell U3219Q + HP ZR24w
Case Raijintek Thetis
Audio Device(s) Audioquest Dragonfly Red :D
Power Supply Seasonic 620W M12
Mouse Logitech G502 Proteus Core
Keyboard G.Skill KM780R
Software Arch Linux + Win10
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
13,147 (2.95/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
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
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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.
 

bug

Joined
May 22, 2015
Messages
13,210 (4.06/day)
Processor Intel i5-12600k
Motherboard Asus H670 TUF
Cooling Arctic Freezer 34
Memory 2x16GB DDR4 3600 G.Skill Ripjaws V
Video Card(s) EVGA GTX 1060 SC
Storage 500GB Samsung 970 EVO, 500GB Samsung 850 EVO, 1TB Crucial MX300 and 2TB Crucial MX500
Display(s) Dell U3219Q + HP ZR24w
Case Raijintek Thetis
Audio Device(s) Audioquest Dragonfly Red :D
Power Supply Seasonic 620W M12
Mouse Logitech G502 Proteus Core
Keyboard G.Skill KM780R
Software Arch Linux + Win10
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
135 (0.04/day)
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
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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