Why is STDOUT to STDIN so dang slow in Windows?

I have a JAR file that reads a specific file format and writes the data to STDOUT.
I have another JAR file that reads this data from STDIN and processes it.
This data has hundreds of millions of records, each of which are ~2K bytes long.
When i read this data from a text file i can read it at a blazing speed, like multiple million records per minute.
However, when i run:
java -jar DataReader.jar | java -jar DataProcessor.jar (this is an example, not the EXACT name of the jars...)
the processing time is MUCH MUCH MUCH less. We're talking MAYBE 20-30K per minute.
I use BufferedOutputStream in the class that writes to STDOUT AND for the class that reads from STDIN.
I have tried increasing the buffersize for the above classes in multiple increments, but it doesn't seem to change anything by much.
Is there some sort of an Achilles Heel that i'm missing that can cripple the speed of this operation if i'm not aware of it, or is this just a naturally doomed process because of something in Windows?
What kind of throughput should i expect in this situation? What is fair/expected?
Any info is greatly appreciated!

>
I have a JAR file that reads a specific file format and writes the data to STDOUT.
I have another JAR file that reads this data from STDIN and processes it.
I use BufferedOutputStream in the class that writes to STDOUT AND for the class that reads from STDIN.
>
For me the obvious question is why you are sending the data to the file system at all. Why not just pass it from the reader to the processor directly.
If the processor is reading from STDIN the data must be in text format so why not have the reader use a ByteArrayOutputStream and let the processor use that byte array as a ByteArrayInputStream.
There must be something you aren't telling us.

Similar Messages

  • Why is muse always wakes up very slow in windows.

    When i switch in programs and i click  in the the opened  muse, muse always need a second of 5-6 to react.
    Once muse is active it runs fast and good.
    My PC runs on Windows 7 pro  - 16Gb Ram i use around 5-6Gb so there is space enough.
    and the processor is a Intel Core i7-2600 @3,4 Ghz

    I found the correct answer for my situation.
    The program get slower after adding more pages and more content (+120 Pages)
    The data of my site was located on our network server.
    I copy everything to my local C: drive (SSD) and all problems where gone.

  • Why does my iPhoto open and run slow since upgrading to OSX 10.8.5

    Why does my iPhoto open and run slow since upgrading to OSX 10.8.5?  I have an Imac - Intel 2.5 GHz quad core I5 - with 20 GB of memory. Before the upgrade it was much faster.

    Why does my iPhoto open and run slow since upgrading to OSX 10.8.5?  I have an Imac - Intel 2.5 GHz quad core I5 - with 20 GB of memory. Before the upgrade it was much faster.

  • Why is running Elements 8 slower on Windows 7 than XP?

    I am afraid this is query is a bit long, but I have tried to provide all the
    info I can ....
    THE PROBLEM
    My old PC died, so I bought a new PC to improve my video processing speed, and also move off Windows XP.
    - I installed the same copy of Adobe Premiere Elements 8 on both PCs.
    - I applied no updates (on either machine) as the original versions works fine (on XP - why fix something that isn't broken)
    - I changed the preferences to stop background rendering (due to data volumes -
    same on old PC).
    - I then copied the project file (.prel) from the old PC to the new.
    Having set up the new PC, I carried out a benchmark test in Premiere Elements 8.0 converting the same 4-hour long HD file from M2TS to MPG on both PCs.
    It was 4 times slower on the new PC !!!!
    I then tried out another video conversion program (to demux MPG files so that they can be edited in Premiere) and that was 30% faster on the new PC.
    In the Premier test the original file was on a 6GB/s 3TB disk drive with the output file on a 6GB/s 2TB drive (which also has the Windows system and Adobe cache files).
    -  Both processes ran identically without errors.  In fact the output files were almost identical (one was 12 685 358 KB, the other 12 658 402 KB). I ran MediaInfo on both output files and it summarised them as identical in terms of codecs, size, etc, etc.
    - On the old PC, CPU utilisation is usually around 90%, on the new one it is closer to 50%.
    - Disk and memory utilisation are not limiting factors.
    Can anyone help me finding out why the new PC is so much slower than the old?
    SPECIFICATIONS
    OLD PC
    ASUS P8Z68-V
    INTEL CORE I5 2500K 3.30GHZ
    2 x KINGSTON 4096MB DDR3
    NVIDIA GeForce GT 440 1GB
    1 x 2 TB disks with 4k sectors
    4 x 3 TB disks with 4k sectors (each with 2 partitions)
    Windows XP Pro SP3
    NEW PC
    ASUS P8H77V
    INTEL I7 3770 3.4GHZ
    2 x KINGSTON 4096MB DDR3
    NVIDIA GeForce GT 610 1GB
    1 x 2 TB disks with 4k sectors
    4 x 3 TB disks with 64k sectors
    Windows 7 Pro
    BACKGROUND
    I have a very specific use of Premiere (for research purposes):
    - I have 2 HD video Sony XDR160E camcorders monitoring bird nests 13 hours per day.
    - Each camera generates 160 GB data per day on its internal HD.
    - File sizes range from 20 GB (smallest) to 160 GB.
    - I download the files from the camera to disk using the cameras download facility.
    It is then that I use Premiere.
    - I open a project that has the exact specs of the camera's output.
    - I open the M2TS file in Premiere, drag it onto the sceneline.
    - I do not view the file but immediately share it using a preset that matches the requirements of my MVIX PVR.
    This bit is not relevant to the problem per se, but provides background info:
    - I then copy the file onto the PVR decoder.
    - I view the file through an MVIX PVR which allows viewing at 32x speed with minimal data loss.
    - I will then identify activity periods (which may be only 5 minutes per day).
    - I use the camera's editor to extract the relevant clips keeping all the camera metadata intact.
    - After that I may use Premiere again to create illustrative montages.
    CONCLUSION
    Does anyone have a clue as to why I am having this problem? (it is not an error per se)
    - The obvious differences are the operating system, the graphics card and the disk allocation unit size
    - It may well NOT be a Premiere issue, it may be Windows 7 Pro that is causing the problem.
    - I assume that the graphics card is irrelevant as I never actually view the video in Premiere (in this scenario)
    - Could it be that Adobe cannot handle the 64k disk allocation size?
    - Is there some special setting in Windows 7 that I need to enable that wasn't required in Windows XP?
    - Is there some special setting in Adobe that I need to enable when running in a 64-bit environment?
    Or is there something else I am missing?
    Any help would be really appreciated - it could take weeks to try out all the various combinations to identify the problem.
    Giles

    Steve
    Thanx for your insights.  I do not have the disks partitioned (except the system disk, I always like to keep the system files separated from the 'user' files to make backups simpler).
    I suspect you are right that upgrading to 11 would speed things up, but I still suspect there is something more fundamentally wrong in my Windows 7 set-up - my guess is that upgrading to 11 might double the speed of processing - but that would still leave it 50% slower than on the old machine.
    My first step will be to run all the patches on 8 - but not for a few days. We are expecting 3 or 4 days of thunderstorms (normal for this time of year in South Africa) and my UPS hasn't the battery life to keep going during an upgrade cycle.
    Giles

  • Why is my mid 2007 iMac so slow now that I've loaded 10.9.4

    Why is my mid 2007 iMac so slow now that I've loaded 10.9.4? Everything seems to be slow. It was quick enough on 10.4. I now have wireless connection issues, and wired keyboard connection issues?
    2.4 GHz Intel Core2 Duo, 4GB 667 Mhz DDR2 SDRAM

    Hi there - thanks. No, I haven't run anything like Clean My Mac - what would you suggest?
    EtreCheck version: 1.9.15 (52)
    Report generated September 9, 2014 at 8:56:44 PM PDT
    Hardware Information: ?
      iMac (24-inch Mid 2007) (Verified)
      iMac - model: iMac7,1
      1 2.4 GHz Intel Core 2 Duo CPU: 2 cores
      4 GB RAM
    Video Information: ?
      ATI,RadeonHD2600 - VRAM: 256 MB
      iMac 1920 x 1200
    System Software: ?
      OS X 10.9.4 (13E28) - Uptime: 14 days 9:40:19
    Disk Information: ?
      SAMSUNG HD103UJ disk0 : (1 TB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted>: 209.7 MB
      Macintosh HD (disk0s2) / [Startup]: 999.35 GB (321.09 GB free)
      Recovery HD (disk0s3) <not mounted>: 650 MB
    USB Information: ?
      Apple, Inc. Keyboard Hub
      Apple Inc. Apple Keyboard
      Seagate FA GoFlex Desk 1.5 TB
      S.M.A.R.T. Status: Verified
      disk1s1 (disk1s1) <not mounted>: 32 KB
      FreeAgent GoFlex Drive (disk1s3) /Volumes/FreeAgent GoFlex Drive: 1.5 TB (20.68 GB free)
      Apple Inc. Built-in iSight
      Apple Inc. Bluetooth USB Host Controller
      Apple Computer, Inc. IR Receiver
    Gatekeeper: ?
      Mac App Store and identified developers
    Kernel Extensions: ?
      [loaded] com.seagate.driver.PowSecDriverCore (5.1.1) Support
      [not loaded] com.seagate.driver.PowSecLeafDriver_10_4 (5.1.1) Support
      [loaded] com.seagate.driver.PowSecLeafDriver_10_5 (5.1.1) Support
      [not loaded] com.seagate.driver.SeagateDriveIcons (5.1.1) Support
      [not loaded] net.pocketmac.driver.BlackberryUSB (3.0.9) Support
      [not loaded] net.pocketmac.driver.BlackberryUSBDev (3.0.9) Support
    Startup Items: ?
      AdobeVersionCueCS2: Path: /Library/StartupItems/AdobeVersionCueCS2
    Problem System Launch Daemons: ?
      [failed] com.apple.printtool.daemon.plist
      [failed] com.apple.wdhelper.plist
    Launch Daemons: ?
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.adobe.SwitchBoard.plist Support
      [loaded] com.google.keystone.daemon.plist Support
      [loaded] com.microsoft.office.licensing.helper.plist Support
    Launch Agents: ?
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [running] com.adobe.AdobeCreativeCloud.plist Support
      [running] com.brother.LOGINserver.plist Support
      [loaded] com.google.keystone.agent.plist Support
      [running] com.seagate.SeagateStorageGauge.plist Support
    User Launch Agents: ?
      [loaded] com.adobe.AAM.Updater-1.0.plist Support
      [loaded] com.adobe.ARM.[...].plist Support
      [loaded] com.facebook.videochat.[redacted].plist Support
      [running] com.memeo.Memeod.plist Support
    User Login Items: ?
      Microsoft AU Daemon
      SpeechSynthesisServer
      iTunesHelper
      AdobeResourceSynchronizer
      Google Drive
      Dropbox
      Microsoft Database Daemon
      Microsoft Outlook
      ExpanderDaemon
      VersionCueCS2Status
    Internet Plug-ins: ?
      o1dbrowserplugin: Version: 5.4.2.18903 Support
      Google Earth Web Plug-in: Version: 7.1 Support
      Default Browser: Version: 537 - SDK 10.9
      Flip4Mac WMV Plugin: Version: 2.3.8.1 Support
      OVSHelper: Version: 1.0 Support
      RealPlayer Plugin: Version: (null) Support
      AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 Support
      FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
      AdobePDFViewerNPAPI: Version: 10.1.6 Support
      DivXBrowserPlugin: Version: 2.1 Support
      Flash Player: Version: 15.0.0.152 - SDK 10.6 Support
      iPhotoPhotocast: Version: 7.0
      googletalkbrowserplugin: Version: 5.4.2.18903 Support
      QuickTime Plugin: Version: 7.7.3
      AdobePDFViewer: Version: 10.1.6 Support
      SharePointBrowserPlugin: Version: 14.1.0 Support
      Silverlight: Version: 5.1.20125.0 - SDK 10.6 Support
      JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
    Safari Extensions: ?
      wpa
      html5video
    Audio Plug-ins: ?
      BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
      AirPlay: Version: 2.0 - SDK 10.9
      AppleAVBAudio: Version: 203.2 - SDK 10.9
      iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins: ?
      Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User iTunes Plug-ins ?
      TuneUp Visualizer: Version: (null) Support
    User Internet Plug-ins ?
      Move-Media-Player: Version: npmnqmp 071303000006 Support
      fbplugin_1_0_3: Version: (null) Support
      WebEx: Version: 1.0 Support
      WebEx64: Version: 1.0 Support
    3rd Party Preference Panes: ?
      Adobe Version Cue CS2  Support
      DivX  Support
      Flash Player  Support
      Flip4Mac WMV  Support
    Time Machine: ?
      Skip System Files: NO
      Auto backup: YES
      Volumes being backed up:
      Macintosh HD: Disk size: 930.71 GB Disk used: 631.68 GB
      Destinations:
      FreeAgent GoFlex Drive [Local] (Last used)
      Total size: 1 TB
      Total number of backups: 100
      Oldest backup: 2013-08-22 07:36:47 +0000
      Last backup: 2014-09-10 03:01:26 +0000
      Size of backup disk: Too small
      Backup size 1 TB < (Disk used 631.68 GB X 3)
      Time Machine details may not be accurate.
      All volumes being backed up may not be listed.
    Top Processes by CPU: ?
          76% Microsoft Outlook
          7% ARM
          4% Google Drive
          1% launchservicesd
          1% Microsoft Database Daemon
    Top Processes by Memory: ?
      172 MB Finder
      135 MB Microsoft Outlook
      94 MB Google Chrome
      94 MB com.apple.IconServicesAgent
      94 MB WindowServer
    Virtual Memory Information: ?
      158 MB Free RAM
      866 MB Active RAM
      706 MB Inactive RAM
      655 MB Wired RAM
      93.45 GB Page-ins
      3.83 GB Page-outs

  • HT4528 Why is the WiFi and browser so slow on iPhone 5?

    Why is the WiFi and browser so slow on iPhone 5?  I've noticed they are not as quick as other smart phones and have seen this brought up in forums.  Also, the WiFi was slow with my iPhone 4 anyone know what the deal is?
    Thanks in advance

    Sadly that spiffy reply was of no use.  Browser is so slow and in looking at 3 different iPhones I have noticed there is a serious wait for any simple page to come up like MSN maybe its the iOS maybe Safari maybe should reset daily.  Truly not impressed Apple can you here us now?  Probably not... to busy restarting or resetting.
    Truly hope it improves in a hurry.

  • Why is the download/upload speed so slow on my MBA (about 5 times slower than my PC)?

    Why is the download/upload speed so slow on my MBA (about 5 times slower than my PC)?

    Are you on band 13 or band 4?  13 is the original LTE band and remains relatively congested. Band 4 is the XLTE band and is less congested and has higher overall potential bandwidth (15 MHz vs 10 MHz). Even so, 7 Mbps is more than enough for doing stuff on your phone and is not considered slow. 
    To check band,
    dial *3001#12345#*
    select serving cell info
    frequency band will say 13 or 4
    FInd an area with band 4 and retest. 

  • Why is the same wirelles connection too slow for an iphone4 when it is quite fast to an iphone5?

    Why is the same wirelles connection too slow for an iphone4 when it is quite fast to an iphone5?

    You really have a question for iPhone support here, so I suggest that you post in the appropriate support area:
    Using iPhone
    The experts over there will likely suggest that you use the Apple Troubleshooting Guide for iOS devices, so you might want to work your way through that before you post in the iPhone support area.
    http://support.apple.com/kb/TS1398

  • Why is live and video streaming so slow on my MacBook Pro?

    why is live and video streaming so slow on my MacBook Pro?

    Hi redngreen,
    Does this happen with Wi-Fi and ethernet?
    Is your network slow with other activities?
    There's a section in this article for Wi-Fi network seems slow.  Some of it applies to Ethernet as well.
    Wi-Fi: How to troubleshoot Wi-Fi connectivity - Apple Support
    Best regards,
    Nubz

  • Why in Mac Os Lion is very slow to clean the "basket"

    why in Mac Os Lion is very slow to clean the "basket"

    Check in Finder > Preferences > Advanced tab > uncheck "Empty Trash securely".
    Regards,
    Captfred

  • Why my Illustrator CC is now very slow for opening a 2MB AI file (about 5 minutes), at the beginning (1 month ago) it was very fast (10 seconds).

    Why my Illustrator CC is now very slow for opening a 2MB AI file (about 5 minutes), at the beginning (1 month ago) it was very fast (10 seconds).

    Assuming that you system meets minimal requirements for CC, make sure you have enough space on your hard drive. By saying enough, I try not to cross 3/4 of its capacity but trivially saying, the more free space the better and the faster the drive the better (I've been considering an SSD drive but still running a regular HDD).
    If you are on Windows, clean up the %TEMP% folder regularly and keep the disk neat using the defragmentation tool.
    Click Start>Run>enter %temp% , wait for the files to load and select all, hit Shift+DEL to remove them permanently.
    For the defrag tool, you can use either the defrag /? command from the command line or right-click the drive, click Properties > Tools > Defragmentation>Defragment Now
    Other than that it requires deeper analysis to find performance bottleneck.

  • I just bought my Iphone 5, why is it that it is very slow or hard to connect when nearby wifi stations unlike the Ipad/Ipod units?

    I just bought my Iphone 5, why is it that it is very slow or connot connect at all when nearby WIFI stations unlike the Ipad/Ipod units?

    Have already taken the necessary steps but to no avail.  I would like to take this oppurtunity to inquire from Iphone 5 users if they experienced the same..the gadget is very slow in picking up WIFI signal unlike the Ipad/Ipod units.. If this is the case then its a big draw back for Iphone 5..it's also draining its battery fast.

  • Why my Mac Pro 2009 became too slow after updated Yosemite?

    Why my Mac Pro 2009 became too slow after updated Yosemite?

    When the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • HT1677 why when i connect safari to internet the other windows computers slow down the connection?

    why when i connect safari to internet the other windows computers slow down the connection?

    Your question has nothing to do with using iPhones in the Enterprise...which is the focus of this forum.  Suggest you post it in the OS X forums

  • Why has my iMac started to be slow logging on

    Why has my iMac started to be slow when first logging on, is it anything to do with me upgrading to Mavericks from 10.7, and is there any way it can be rectified?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for

  • IE11 doesn't accept format of domainname\username when authentication through ADFS

    I am using IE11 , when I log on to Office365 through ADFS , the login page only accepts userprincipalname format . It doesn't accept domain\username format , if use domain\username , password will prompt again and again . However , the issue is not h

  • Propagating messages with job_queue_processes = 0 ?

    Hello, is it possible to propagate messages between queues (on different databases) with jobs disabled. Was looking into manual and AQ packages to find appropriate procedure, but no luck so far. We need this to test propagation before all jobs go onl

  • Using 'execute immediate'

    Hi, for instance, we have 4 parameters for that, i remember we should use each parameter ONLY ONCE within the statement. am i right? Or we can reuse each parameter again and again? like execute immediate 'select ... where :4=''a'' and :4<>'' ''' Rgds

  • Msn looses letters and pictures when opened

    when i open msn under safari as my home page the letters,words,what ever just dissappear when the mouse pointer goes over them.i have to reload 4 or more times to get it to stop.i have since tried firefox and dont have this problem. what cause this?

  • Dynamic Link Manager Stopped Working - New CC Apps

    As I expectedthe new CC apps seem to have issues when installing on systems where the user profile is used elsewhere other than c: drive. I know this becuase As soon as I created a new user on the c: drive and logged on and launched the apps they wor