forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5383b5d
committed
Okay, I have some new code in place that hopefully should work better. I
couldn't produce a full patch using cvs diff -c this time since I havecreated new files and anonymous cvs usage doesn't allow you toadds. I'm supplying the modified src/interfaces/jdbc as a tarball at :http://www.candleweb.no/~gunnar/projects/pgsql/postgres-jdbc-2000-10-05.tgzThe new files that should be added are :? org/postgresql/PGStatement.java? org/postgresql/ObjectPool.java? org/postgresql/ObjectPoolFactory.javaThere is now a global static pool of free byte arrays and used byte arraysconnected to a statement object. This is the role of the new PGStatementclass. Access to the global free array is synchronized, while we rely onthe PG_Stream synchronization for the used array.My measurements show that the perfomance boost on this code is not quite asbig as my last shot, but it is still an improvement. Maybe some of thedifference is due to the new synchronization on the global array. I think Iwill look into choosing between on a connection level and global level.I have also started experimented with improving the performance of thevarious conversions. The problem here is ofcourse related handle thevarious encodings. One thing I found to speed up ResultSet.getInt() a lotwas to do custom conversion on the byte array into int instead of goingthrough the getString() to do the conversion. But I'm unsure if this isportable, can we assume that a digit never can be represented by more thanone byte ? It works fine in my iso-latin-8859-1 environment, but what aboutother environments ? Maybe we could provide different ResultSetimplementations depending on the encoding used or delegate some methods ofthe result set to an "converter class".Check the org/postgresql/jdbc2/FastResultSet.java in the tarball above tosee the modified getInt() method.Regards, Gunnar1 parent52cba15 commit5383b5d
File tree
13 files changed
+412
-84
lines changed- src/interfaces/jdbc/org/postgresql
- jdbc1
- jdbc2
- util
13 files changed
+412
-84
lines changedLines changed: 37 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 |
| |
85 | 90 |
| |
86 | 91 |
| |
| |||
164 | 169 |
| |
165 | 170 |
| |
166 | 171 |
| |
167 |
| - | |
168 |
| - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
169 | 175 |
| |
170 | 176 |
| |
171 | 177 |
| |
| |||
236 | 242 |
| |
237 | 243 |
| |
238 | 244 |
| |
239 |
| - | |
| 245 | + | |
240 | 246 |
| |
241 | 247 |
| |
242 | 248 |
| |
| |||
248 | 254 |
| |
249 | 255 |
| |
250 | 256 |
| |
251 |
| - | |
| 257 | + | |
252 | 258 |
| |
253 | 259 |
| |
254 | 260 |
| |
| |||
263 | 269 |
| |
264 | 270 |
| |
265 | 271 |
| |
266 |
| - | |
| 272 | + | |
267 | 273 |
| |
268 | 274 |
| |
269 | 275 |
| |
| |||
306 | 312 |
| |
307 | 313 |
| |
308 | 314 |
| |
309 |
| - | |
| 315 | + | |
| 316 | + | |
310 | 317 |
| |
311 | 318 |
| |
312 | 319 |
| |
313 | 320 |
| |
314 | 321 |
| |
315 | 322 |
| |
316 | 323 |
| |
| 324 | + | |
317 | 325 |
| |
318 | 326 |
| |
319 | 327 |
| |
320 | 328 |
| |
321 |
| - | |
| 329 | + | |
| 330 | + | |
322 | 331 |
| |
323 | 332 |
| |
324 | 333 |
| |
325 |
| - | |
| 334 | + | |
| 335 | + | |
326 | 336 |
| |
327 | 337 |
| |
328 | 338 |
| |
| |||
352 | 362 |
| |
353 | 363 |
| |
354 | 364 |
| |
355 |
| - | |
356 |
| - | |
| 365 | + | |
357 | 366 |
| |
358 | 367 |
| |
359 | 368 |
| |
| |||
370 | 379 |
| |
371 | 380 |
| |
372 | 381 |
| |
373 |
| - | |
| 382 | + | |
| 383 | + | |
374 | 384 |
| |
375 | 385 |
| |
376 | 386 |
| |
| |||
381 | 391 |
| |
382 | 392 |
| |
383 | 393 |
| |
384 |
| - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
385 | 397 |
| |
386 | 398 |
| |
387 | 399 |
| |
| |||
423 | 435 |
| |
424 | 436 |
| |
425 | 437 |
| |
426 |
| - | |
| 438 | + | |
| 439 | + | |
427 | 440 |
| |
428 | 441 |
| |
429 | 442 |
| |
| |||
438 | 451 |
| |
439 | 452 |
| |
440 | 453 |
| |
441 |
| - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
442 | 457 |
| |
443 | 458 |
| |
444 |
| - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
445 | 462 |
| |
446 | 463 |
| |
447 | 464 |
| |
| |||
461 | 478 |
| |
462 | 479 |
| |
463 | 480 |
| |
| 481 | + | |
| 482 | + | |
464 | 483 |
| |
465 | 484 |
| |
466 | 485 |
| |
| |||
474 | 493 |
| |
475 | 494 |
| |
476 | 495 |
| |
477 |
| - | |
| 496 | + | |
| 497 | + | |
478 | 498 |
| |
479 | 499 |
| |
480 | 500 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 |
| |
81 | 83 |
| |
82 | 84 |
| |
|
Lines changed: 86 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + |
Lines changed: 57 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + |
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + |
0 commit comments
Comments
(0)