Permalink
Commits on Jan 16, 2016
  1. Update change log

    committed Jan 16, 2016
Commits on Jan 15, 2016
  1. with-collection macro: type hints improvement

    From all the resources I found about type hinting in macros,
    it doesn't work like it does for normal functions.
    
    I got reflection warnings for a code like this:
    
    ```clj
    (let [conn (mg/connect)
          db (delay (mg/get-db conn "monger-test"))]
      (with-collection @db "something"
        (find {})))
    ```
    
    The type hint for `db` didn't work. Actually the type hint that works
    comes from the function `core/get-db` and we see this when we remove
    `delay` from the code above. As we could expect, the function `deref`
    doesn't propagate the type hint.
    
    I did similar tests with the collection name and no reflection warning
    was raised for any case. In addition, it looked weird for me to have
    a type hint like `^String` and then a checking like `string?` later.
    
    Some references:
    
    * http://stackoverflow.com/questions/11919602/generating-clojure-code-with-type-hints
    * Clojure High Performance Programming, page 44.
    boechat107 committed Jan 15, 2016
Commits on Jan 10, 2016
  1. Back to dev version

    committed Jan 10, 2016
  2. 3.0.2

    committed Jan 10, 2016
  3. Update change log

    committed Jan 10, 2016
  4. Fix cursor hinting

    The .hint method should be applied on the cursor object instead
    of the DBObject contained in the hint field.
    stijnopheide committed with Jan 6, 2016
Commits on Jan 6, 2016
  1. Merge pull request #126 from stijnopheide/fix-cursor-hint

    Fix cursor hinting
    committed Jan 6, 2016
  2. Fix cursor hinting

    The .hint method should be applied on the cursor object instead
    of the DBObject contained in the hint field.
    stijnopheide committed Jan 6, 2016
Commits on Jan 2, 2016
  1. Update (c) year

    committed Jan 2, 2016
Commits on Dec 19, 2015
  1. Upgrade to Codox 0.9.0

    committed Dec 19, 2015
Commits on Oct 9, 2015
  1. Merge pull request #121 from Deraen/master

    Add changelog entry for from-db-object perf improvement
    committed Oct 9, 2015
Commits on Oct 8, 2015
  1. Merge pull request #120 from Deraen/improve-from-db-object-perf

    Improve from db object perf
    committed Oct 8, 2015
  2. Remove from-db-object implementation for Map

    It should be enough that from-db-object is implemented for DBObject
    Deraen committed Oct 8, 2015
  3. Fix test cases with bad = forms

    Deraen committed Oct 8, 2015
  4. Optimize from-db-object performance for DBObjects

    Creating temporary sequence from DBObject is quite slow. Using
    .keySet for reduce collection and calling .get inside reduce is
    considerably faster. The common code between Map and DBObject
    implementations can't be shared as reflection would completely kill the
    performance and function can't be type hinted as DBObject doesn't
    implement Map interface.
    
    Added a simple test case for the from-db-object performance. I'm seeing
    performance increase of 20% on this (170ms -> 140ms).
    Deraen committed Oct 8, 2015
  5. Fix map comparisons and rename test case

    Two tests had the same name so only the latter was ran
    Deraen committed Oct 8, 2015
Commits on Sep 25, 2015
  1. Merge pull request #119 from tommireinikainen/update-contributing-md

    Minor updates to CONTRIBUTING.md
    committed Sep 25, 2015
Commits on Sep 24, 2015