- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Performance Tuning Tips
Performance optimization is a complex exercise and require due diligence before starting. Do your initial analysis. Use a profiler on your application first to figure out which areas are taking more time than expected. Took the bigger one first and start working on them. Following are few of the techniques specific to java performance tuning.
- Use StringBuilder to concatenate Strings if your code area is thread-safe.
- Use + operator to concatenate strings if it is in single statement.
- Use primitives as much as possible instead of wrapper classes.
- Use long, double instead of BigNumber or BigDecimal if possible.
- Check log level, it should be info for production level instance of your application.
- Use caching to cache database connections or heavy objects.
- Use Apache commons StringUtils.replace instead of String.replace. As former is much faster.
- Try optimizing read(), write() calls during file I/O.
- Increase buffer size if large memory is available.
- Related Articles
- Automatic Performance Tuning of CentOS/RHEL Servers
- Important MYSQL Performance Tuning and Settings after Installation
- Tips to Boost your Computer Performance
- What is data warehouse tuning?
- Hyperparameter Tuning in Machine Learning
- Essential Java Tips and Tricks for Programmers
- What are Some Cool Java Debugging Tips?
- How does a tuning fork make a sound?
- Is Performance Management the Same as Performance Appraisal?
- Ethernet Performance
- Performance Metrics
- Performance Appraisal
- Troubleshooting tips
- The Ethernet Performance
- Difference between Cost Performance Index (CPI) and Schedule Performance Index (SPI)

Advertisements