Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8020849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:48:26+00:00 2026-06-04T21:48:26+00:00

I am trying to diagnose a performance problem for a Java application which is

  • 0

I am trying to diagnose a performance problem for a Java application which is built on top of OSGi. The platform is an ARM5 processor running on an embedded Linux box. CPU utilization is frequently 100% with high memory consumption.

I’m on the embedded O/S side of the house, with the Java developers more skilled in Enterprise application development than Embedded. While my background also includes embedded Java, I’ve avoided OSGi for precisely this reason.

I’m looking for low-hanging fruit — what are some common design errors that might be causing excess CPU and memory consumption that I could quickly investigate to get the CPU utilization back down to something far more reasonable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:48:27+00:00Added an answer on June 4, 2026 at 9:48 pm

    Here are some common design traps, hope this helps:

    • The creation of threads can be very “expensive”. Do you have e.g. messaging that constantly creates new threads? Use a thread pool.

    • same for objects (e.g. messages, measurements), especially heavy wrappers where only a single field inside changes. Use an object pool – it helps A LOT!

    • Be very careful with strings, especially concatenation. Calling simple operations on strings (replacing, appending, copying) often involve the usage of many temporary objects “under the surface”, which has a negative effect both on memory and garbage collection. When modifications of strings are done in code which is executed very often (e.g. common methods of log helper classes, methods responsible for composing messages for sending over a protocol, etc.) then optimizations which replace the ineffective methods with implementations which don’t use temporary objects improve the performance significantly.

      • Use StringBuffer
      • Use own String parsing via String.indexOf(int) instead of StringTokenizer whenever possible
      • First char comparison via string.charAt(0) is faster than String.startsWith(str)
      • Use String’s equals method instead of equalsIgnoreCase whenever possible
    • adjust the log level not to include debug messages during normal work. The simple creation of all these debug messages could slow down the system considerably. Also output to the console (even if you don’t see it) usually slows down the system – always log to the OSGi Log service instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to diagnose a problem with a server application running on a Client
I am trying to diagnose a problem with an internal production application. We have
I'm trying to diagnose a java.lang.OutOfMemoryError: PermGen Space error when running on Sun's Hotspot
I am trying to diagnose this problem. TAB creates 4 spaces instead of a
I'm trying to diagnose a PermGen memory leak problem in a Sun One 9.1
I've been trying to increase performance and diagnose deadlocks on a SQL Server 2005
I am currently trying to diagnose a slow memory leak in my application. The
I'm trying to diagnose and fix a bug which boils down to X/Y yielding
Please could someone help diagnose this tiny problem that shouldn't be one - trying
I'm trying to diagnose a problem in UKSyntaxColoredTextDocument 0.4 http://www.zathras.de/angelweb/blog-uksctd-oh-four.htm where text that actually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.