How can you make idle processors pick up java work?

Discussion in 'Java' started by qwertmonkey, Jul 31, 2012.

  1. qwertmonkey

    qwertmonkey Guest

    From:

    ~
    Well, yes. I am not sure if I am right (or the extent to which ...),
    but it seems I am dealing here with a physical barrier, that may not be
    friendly to "logical" ways. Unless the original file is split into and placed
    in 8 different physical disks, the data transfer does not find bottlenecks
    through the memory subsystem, ...
    ~
    While reading the characters by means of a (NIO 2 Files.new)BufferedReader
    (which uses non-blocking I/O, right?) and parsing the sentences myself, I can
    read the whole file on a laptop based on an AMD Turion 64X2 Dual Core and 4Gb
    in less than 10 seconds
    ~
    BufferedReader BfR = Files.newBufferedReader(IFlPth,
    Charset.forName("UTF-8"));
    char[] cBfr = new char[iBL];
    // __
    int iRdByts = BfR.read(cBfr, iBfr00, iBfr02);
    while(iRdByts > -1){
    for(int i = iBfr00; (i < iRdByts); ++i){
    if(cBfr == cLF){ ++lLns; }
    }
    iRdByts = BfR.read(cBfr, iBfr00, iBfr02);
    }// (iRdByts > -1)
    // __
    BfR.close();
    ~
    I still have to code the logic on top of it, but that is much, much better
    than it was taking before
    ~
    Please, let me know if you have a better idea of how to read very large text
    files in a faster way (while using a regular/sub-optimal box) ~
    lbrtchx

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    qwertmonkey, Jul 31, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    213
    Roedy Green
    Jul 31, 2012
  2. Replies:
    3
    Views:
    213
    John B. Matthews
    Jul 31, 2012
  3. Replies:
    2
    Views:
    216
    Joshua Cranmer
    Jul 31, 2012
  4. Replies:
    0
    Views:
    157
  5. Replies:
    0
    Views:
    115
Loading...

Share This Page