|
true stream optimizing needs subclassing java.io.InputStream: msg#00254db.postgresql.jdbc
This continues the discussion of optimizing the reading of characters from the backend. >From what I can tell, PG_Stream.ReceiveChar() is no less efficient (approximately) than PG_Stream.Receive(byte[] b, int off, int length). The later is simply a wrapper around InputStream's method read(b,off,len). My test showed little or no difference between the two methods. We would need to override read(b,off,len) for true improvements. from java.io.InputStream: <snip> The read(b, off, len) method for class InputStream simply calls the method read() repeatedly. If the first such call results in an IOException, that exception is returned from the call to the read(b, off, len) method. If any subsequent call to read() results in a IOException, the exception is caught and treated as if it were end of file; the bytes read up to that point are stored into b and the number of bytes read before the exception occurred is returned. Subclasses are encouraged to provide a more efficient implementation of this method. </snip> I still have to test this over a modem. The high latency may demonstrate the benefits of buffering. Mike ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@xxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Interrupt execution: 00254, Tim Lucia |
|---|---|
| Next by Date: | Re: Problem with JDBC: no suitable driver: 00254, Konstantinos Spyropoulos |
| Previous by Thread: | Re: DBVisualizer Null Pointer Exceptioni: 00254, Robert Treat |
| Next by Thread: | jxdbcon JDBC driver: 00254, Nadim Bitar |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |