<< Back to previous view

[JDBC-152] Reflection in 0.7.0-beta2 Created: 02/Jul/17  Updated: 04/Jul/17  Resolved: 03/Jul/17

Status: Closed
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Trivial
Reporter: Jeaye Wilkerson Assignee: Sean Corfield
Resolution: Completed Votes: 0
Labels: performance, reflection


 Description   

Reflection warning, clojure/java/jdbc.clj:980:49 - call to method getColumnLabel can't be resolved (target class is unknown).
Reflection warning, clojure/java/jdbc.clj:985:29 - reference to field next can't be resolved.



 Comments   
Comment by Sean Corfield [ 02/Jul/17 9:13 PM ]

Thanks! I'll take a look on Monday and add something to my test setup so no more reflection issues creep in!

Comment by Jeaye Wilkerson [ 02/Jul/17 11:56 PM ]

Sounds great, thanks!

Comment by Sean Corfield [ 03/Jul/17 12:41 PM ]

Removed check-all from project.clj as you can't run check on Clojure 1.7/1.8 due to spec-using code. Updated my local test-all.sh to run check on Clojure 1.9 so that reflection warnings will be highlighted by my normal testing process with this library.

Comment by Sean Corfield [ 03/Jul/17 12:49 PM ]

Added type hints in two places in reducible-result-set to address reflection warnings. Will be in 0.7.0.

Comment by Sean Corfield [ 04/Jul/17 11:05 PM ]

Available now in 0.7.0-beta3.

Comment by Jeaye Wilkerson [ 04/Jul/17 11:07 PM ]

Thank you!





[JDBC-31] distinct? throws clojure.lang.ArityException, when applied with no arguments Created: 12/May/12  Updated: 01/Jun/16  Resolved: 10/Jun/12

Status: Closed
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Jürgen Hötzel Assignee: Sean Corfield
Resolution: Completed Votes: 0
Labels: patch,, performance

Attachments: Text File 0001-add-make-cols-unique-test-case-empty-cols.patch     Text File 0002-distinct-throws-clojure.lang.ArityException-when-app.patch    
Patch: Code and Test

 Description   

HSQLDB returns an empty ResultSet when using (.getGeneratedKeys stmt)
and no keys are generated. So this Exception is thrown for each record
without generated keys.

While this Exception is caught in do-prepared-return-keys, this can lead to a huge overhead caused by the JVM exception handling. I did a performance test.

Before Patch:

clojure.java.test-jdbc> (time (sql/with-connection hsqldb-db (count (apply sql/insert-records :dummy  (map #(hash-map :name (str %) :id %) (range 10000))))))
"Elapsed time: 3429.346743 msecs"
10000

After Patch:

 clojure.java.test-jdbc> (time (sql/with-connection hsqldb-db (count (apply sql/insert-records :dummy  (map #(hash-map :name (str %) :id %) (range 10000))))))
"Elapsed time: 1397.444753 msecs"


 Comments   
Comment by Sean Corfield [ 10/Jun/12 5:24 PM ]

Thanx for the patch!





[JDBC-29] Performance improvement (Remove intermediate lazy sequence in resultset-seq) Created: 10/May/12  Updated: 01/Jun/16  Resolved: 10/May/12

Status: Closed
Project: java.jdbc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Jürgen Hötzel Assignee: Sean Corfield
Resolution: Completed Votes: 0
Labels: patch,, performance

Attachments: Text File 0001-Don-t-create-intermediate-lazy-sequences-of-vectors.patch    

 Description   

This improves performance on large result sets by up to 30%.



 Comments   
Comment by Sean Corfield [ 10/May/12 12:09 PM ]

Nice catch!





Generated at Sun Jul 23 03:57:37 CDT 2017 using JIRA 4.4#649-r158309.