Optimize Your Java Code By Tools

Slides:



Advertisements
Similar presentations
Basic Communication on the Internet:
Advertisements

Copyright © SkyeyTech, Inc. BUGtrack Interface.
Managing Incoming Chapter 3 Bit Literacy. Terminology client – program which retrieves s from a mail server, lets you read the mails,
Google Apps: Google Mail Got Gmail?....Need Help? Mrs. Connor.
Server Upgrade From UW to Cyrus. What is an IMAP Server? Provides access to your mail messages stored on the mail server Requires authentication.
26-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 3;00-4:30 Fridays in Moore 207 Lab is not in Towne 309 (Registrar has it wrong) Everyone.
Design and Implementation of a Server Director Project for the LCCN Lab at the Technion.
30-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 1:30-3:00 Fridays in Moore 207 Lab is not in Towne 313 (Registrar has it wrong) Everyone.
©Company confidential 1 Performance Testing for TM & D – An Overview.
Tony Brett Oxford University Computing Services OUCS Learning Technologies Group December 2005 Outlook: and more Tony Brett Oxford University Computing.
Introduction to UTORexchange For IT support providers.
Pro Exchange SPAM Filter An Exchange 2000 based spam filtering solution.
23 October 2002Emmanuel Ormancey1 Spam Filtering at CERN Emmanuel Ormancey - 23 October 2002.
This is the first page of the log in, this is were you enter your unique details.
» Explain the way that electronic mail ( ) works » Configure an client » Identify message components » Create and send messages.
Company LOGO Exploring Using TWIG (Webmail) at ACC.
UNIT-V The MVC architecture and Struts Framework.
Tool Kit. Receiving an When you receive an , it will appear on the white box, which is the conversation list. To do this you will have.
C8: Enterprise Integration Patterns in Sonic ™ ESB Stefano Picozzi Solutions Architect.
OCR Nationals – Unit 1 AO2 (Part 2) – s. Overview of AO2 (Part 2) To select and use tools and facilities to download files/information and to send.
Backup Local Online For secure offsite storage of your , and making it available from any computer or smart phone. Backup accessed with.
Module 8: Managing Client Configuration and Connectivity.
Module 6: Manage and Configure Messaging. Configuring Internet Mail Using Small Business Server (SBS) 2008 Console Configuring Protection Configuring.
-III Outlook How To Topics CS-3505 Outlook form Office 2003 Wb_ -II.ppt.
(or ?) Short for Electronic Mail The transmission of messages over networks.
The Internet 8th Edition Tutorial 2 Basic Communication on the Internet: .
1 © 2002, Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Key differences between Cisco Unity Connection and Cisco Unity Manjit.
-II Outlook How To Topics CS-3505 Outlook 2000 Wb_ -II.ppt.
Archiving s. How to Manage Auto-Archive in Outlook Your Microsoft Outlook mailbox grows as you create and receive items. To manage the space.
Dylan Bayliff. Contents: 1- Sending s & Using etiquette 2- Staying safe and Accessing 3- Open s 4- Replying to s 5- Setting up contacts.
Mail Attender for Exchange Technical Overview Presentation Introduction Sherpa Software Group Narrated by Thomas Hand Approximate Time 15 minutes.
Microsoft Office Outlook 2013 Microsoft Office Outlook 2013 Courseware # 3252 Lesson 6: Organizing Information.
Managing Incoming Chapter 3 Bit Literacy. Terminology client – program which retrieves s from a mail server, lets you read the mails,
Response Class Projects Review. Summary of functionality Configuration Management Establish connection to the servers Establish connection to the.
Eclipse Simple Profiler Ben Xu Mar 7,2011. About Eclipse simple profiler is a open source project to analyze your plug-ins/RCPs performance.
Server to Server Communication Redis as an enabler Orion Free
STAYING SAFE: Here are some safety tips when using Change your password regularly and keep it in a safe place. Don’t share your password with anyone.
Tool Kit. Receiving an When you receive an , it will appear on the white box, which is the conversation list. To do this you will have.
Santa’s s By Jack Carr. Sending an attachment to Santa Explain how you attached the . New message, insert, attachment Explain why you.
Computing Simulation in Orders Based Transparent Parallelizing Pavlenko Vitaliy Danilovich, Odessa National Polytechnic University Burdeinyi Viktor Viktorovych,
Sieve Mail Filtering Language WG (sieve) SIEVE Alexey Melnikov Cyrus Daboo.
NetTech Solutions Microsoft Outlook and Outlook Express Lesson Four.
Using Rules to Tame Your Wild Inbox Gini Courter and Annette Marquis TRIAD Consulting, LLC.
A Quick Look At How Works Understanding the basics of how works can make life a lot easier for any user. Especially those who are interested.
Tool Bars Outlook 2010 The Basics. Address Book  Allows you to find anyone who has a district account  It works just like a search engine.
Performance Optimization in Apache 2.0 Development: How we made Apache faster, and what we learned from the experience O’Reilly Open.
11 MICROSOFT OFFICE OUTLOOK 2003 AND MICROSOFT OUTLOOK EXPRESS Chapter 4.
Sitecore.net Training, Oct ECM 2.1 UPDATE 2 PART 1 CRAWL BEFORE YOU WALK.
[1] Control Spam by the Use of Greylisting Torgny Hallenmark LDC - Computing Center Lund University, Sweden TERENA Networking.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Copyright © SkyeyTech, Inc. CRMdesk Power and elegance.
Practical Hadoop: do’s and don’ts by example Kacper Surdy, Zbigniew Baranowski.
SQL Database Management
Project Management: Messages
Gmail Basics By Laurel Johnson Young Adult Librarian.
SMTP SMTP stands for Simple Mail Transfer Protocol. SMTP is used when is delivered from an client, such as Outlook Express, to an server.
Internet Business Associate v2.0
Based on Eric Dashofy’s slides for
SMTP SMTP stands for Simple Mail Transfer Protocol. SMTP is used when is delivered from an client, such as Outlook Express, to an server.
Introduction CSE 1310 – Introduction to Computers and Programming
RR RR Problems Along With Solutions For iPhone And iPad Toll Free ( )
August 17, 2015 J. Boles, J.Burnias and M.Garcia Office 2013
Programming Problem solving Debugging
Using K2 applications How can users interact with K2 applications?
has many aspects that work together to give people almost instant communication from any computer on the internet to any other computer There.
CSE 373 Data Structures and Algorithms
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
CSE 373: Data Structures and Algorithms
Why Threads Are A Bad Idea (for most purposes)
Presentation transcript:

Optimize Your Java Code By Tools NuPoint Technology Inc. Manager of R&D Dept. Lin, Weicheng

Agenda Why to Optimize Your Code? Introduction Optimize by OptimizeIt Conclusions

Why to Optimize Your Code? Why coding? Why do your program need more execution time or developing time than that of others’? Do you agree that Programming is an ART?

Introduction How to write a good program? Bad implementation Suitable language C++, Java, Perl, Scheme, … Good algorithm You need to learn Algorithm, OS, … Good implementation You need not only a good brain but a good tool Bad implementation Allocate too much memory Instantiate too many objects Bad programmatic logic …

Introduction (Cont.) There are several tools for optimization use: OptimizeIt, … Functions of Optimization Tools Profiling Code Coverage Checking Thread Debugging Progress Tracking Request Analyzing

Optimize by OptimizeIt The goal of the optimization A quick introduction to the application Application architecture Integrating JBuilder and OptimizeIt Optimizing your first project

The Goal of the Optimization Using JBuilder and OptimizeIt to solve performance problems with an email agent A user with 4000 Messages per day Before the performance tuning Several minutes After the performance tuning < 10 seconds Improvement Less execution time Less required memory

A Quick Introduction to the Application Spam filtering It deletes spam from a user's mailbox using a variety of spam-filtering rules Forwarding of desirable email messages to a pager A user can control which email messages should be forwarded from their inbox to their pager Mail server-independence The Email Agent works with any email server that supports the POP-3 or IMAP standards Platform-independence The Email Agent can run on any computer platform that supports Java, making it very flexible to install

Application Scenario Scenario Currently, only a user, with 4,000 messages About 1,000 spam messages Running every five minutes In the need of handling more users

Application Architecture

Basic Algorithm of the Email Agent Application startup. Initialize logger. Read mail server connection properties. Read properties for sending a summary report to the user. Initialize internal lists from configuration files. Create and populate the EmailAgent. Connect to the mailbox. Remove spam from the current folder. Get the message list from the inbox. Determine the UIDs of these messages. Get a list of messages that have already been examined already. While only looking at new messages: One at a time, review each message to determine whether or not it is spam. If the message matches an ``allow'' file rule, let it pass through. Otherwise, test the From, Reply-To, and Subject fields, as well as message attachments. If a message matches a notification criteria, send a message to my pager. Close the mailbox and store. Send me summary information about what actions were taken. Be care of your for-loop!

Basic Configuration Configuring the application allow.from allow.subject allow.contents reject.from reject.subject reject.contents

Integrating JBuilder and OptimizeIt Installation

Integrating JBuilder and OptimizeIt (Cont.)

Optimizing Your First Project

Finding the Performance Problems Java Performance Tuning'' by Jack Shirazi Measure the performance of the application, using tools, and/or by instrumenting the code. Identify the location of any bottlenecks. Think of a hypothesis for the cause of the bottleneck. Consider any factors that might refute your hypothesis. Create a test to isolate the factor identified by the hypothesis. Test the hypothesis. Alter the application to reduce the bottleneck. Test that the alteration improves the performance. Repeat from step 1.

Finding the Performance Problems (Cont.) Simplified version of the process Instrument your code and find the major bottlenecks, using the best tools available Fix the bottlenecks that are causing the biggest problems, don't worry about the others. If you can't fix it, avoid it If performance is now acceptable, celebrate. If not, repeat from step 1

Finding the Performance Problems (Cont.) Fix the bottlenecks that are causing the biggest problems and don't worry about the others Simplified analysis example examineContents() - 70% extractContents() - 20% parseAttachment() - 10%

The First Run: An Example of How to Use Avoidance Therapy

Drill Down Your Programmatic Flow Using Contents needs a lot of time Put this line in the last It will be run when needed

The Second Run Built in JDK 

The Third Run: Problems with Regular Expressions aMatcher.find() wastes too much time indexOf is faster Change the order!

aMatcher.find() is still slow, we use aMatcher.matches() 9,956 ms

9,548 ms

Getting Harder Now 9,548 ms

Getting Harder Now (Cont.) 9,353 ms

Conclusions Reducing the application runtime from over 52 seconds down to about 9.4 seconds You really need a optimization tool, don’t you? Now, do you agree that Programming is an ART?

Thanks!