democracyworks / datomic-toolbox

Datomic Utility Library
19 stars 0 forks source link

Put connection in atom #13

Closed cap10morgan closed 8 years ago

cap10morgan commented 8 years ago

It's supposed to be cached so that calling datomic.api/connect repeatedly is OK. But we were seeing ~5 second pauses sometimes and traced it down to datomic.api/connect. Putting it into an atom seems to fix that.

We'll keep working with Cognitect support to figure out what's up, but I guess there's no reason not to keep doing it this way.

tank157 commented 8 years ago

Oh, did you actually try this out and see if it helped on something?

--Troy

On Feb 13, 2016, at 2:21 PM, Wes Morgan notifications@github.com wrote:

It's supposed to be cached so that calling datomic.api/connect repeatedly is OK. But we were seeing ~5 second pauses sometimes and traced it down to datomic.api/connect. Putting it into an atom seems to fix that.

We'll keep working with Cognitect support to figure out what's up, but I guess there's no reason not to keep doing it this way.

You can view, comment on, or merge this pull request online at:

https://github.com/democracyworks/datomic-toolbox/pull/13

Commit Summary

[WM] Put connection in atom File Changes

M src/datomic_toolbox/core.clj (13) Patch Links:

https://github.com/democracyworks/datomic-toolbox/pull/13.patch https://github.com/democracyworks/datomic-toolbox/pull/13.diff — Reply to this email directly or view it on GitHub.

cap10morgan commented 8 years ago

Yep! On partner-works in production right now. Longest request was 1.something seconds. I think you found the problem! :)

tank157 commented 8 years ago

Nice! Ok, I'll look this over shortly, mind you I've had one or two at Little Machine, so I may not be as thorough as usual ;)

--Troy

On Feb 13, 2016, at 8:02 PM, Wes Morgan notifications@github.com wrote:

Yep! On partner-works in production right now. Longest request was 1.something seconds. I think you found the problem! :)

  • Wes

On Feb 13, 2016, at 7:43 PM, Troy notifications@github.com wrote:

Oh, did you actually try this out and see if it helped on something?

--Troy

On Feb 13, 2016, at 2:21 PM, Wes Morgan notifications@github.com wrote:

It's supposed to be cached so that calling datomic.api/connect repeatedly is OK. But we were seeing ~5 second pauses sometimes and traced it down to datomic.api/connect. Putting it into an atom seems to fix that.

We'll keep working with Cognitect support to figure out what's up, but I guess there's no reason not to keep doing it this way.

You can view, comment on, or merge this pull request online at:

https://github.com/democracyworks/datomic-toolbox/pull/13

Commit Summary

[WM] Put connection in atom File Changes

M src/datomic_toolbox/core.clj (13) Patch Links:

https://github.com/democracyworks/datomic-toolbox/pull/13.patch https://github.com/democracyworks/datomic-toolbox/pull/13.diff — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/democracyworks/datomic-toolbox/pull/13#issuecomment-183805428 . — Reply to this email directly or view it on GitHub.

cap10morgan commented 8 years ago

Hahaha, nice. I'm at The Barley in Steamboat having a few. No rush on that PR. ;)

tank157 commented 8 years ago

LGTM