Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multithreaded XML file parsing?



    Hi Saad,

    In addition to the previous considerations, normally on a single
processor machine, threaded programs will run slower than straight ahead
processing.  That's due to start up, allocation, synchronization, context
switching and so on.

    Threading is most helpful when another thread is idle and work can be
done during that idle time that otherwise couldn't be done until the waited
on task is complete.  Examples are interactive programs waiting on user
input, socket programs waiting on a response, and so on.  In what amounts to
batch processing, straight ahead should be faster.  Specific OS algorithms
may, but probably won't affect that.

    That could even be true with hyperthreading or multiprocessors,
depending on the other work going on; you have no guarantees that multiple
threads will run on different processors.  Even so, often *perceived*
performance is better, and that can be very worthwhile, but I don't think
that's directly applicable in your case.  Again, depends on what, if
anything, else your program is doing.


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO       -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?            http://www.jguru.com/faq/Java400


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Multithreaded XML file parsing? (From: "Saad Mahamood" <email@hidden>)
 >Re: Multithreaded XML file parsing? (From: Oisin Hurley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.