Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the memoised version of neuprint_fetch in a couple more places #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romainFr
Copy link
Collaborator

No description provided.

@jefferis
Copy link
Contributor

Hi @romainFr this might require a little more thought.

  • the memoisation has a memory cost – I have previously run into trouble by memoising skeletons.
  • It has a fixed timeout (1 hour) and I can't find an obvious way to make this user modifiable.
  • we can't really be sure if the underlying data has changed unless we can extract a modification timestamp of the hemibrain database and then update if that changes.

On which point I seem to remember seeing

> neuprint_datasets()
$`hemibrain:v1.0.1`
$`hemibrain:v1.0.1`$`last-mod`
[1] "2019-12-20T23:11:02"

$`hemibrain:v1.0.1`$uuid
[1] "52a13328874c4bb7b15dc4280da26576"

so we might be able to condition the memoisation on the last-mod or uuid fields for the dataset. Perhaps you could get some confirmation from Steve as to whether these change with any change to the database?

@romainFr
Copy link
Collaborator Author

I think what we also want is neuprint_fetch_custom("MATCH (n:Meta) RETURN n.lastDatabaseEdit"), the dataset fields only track the tagged versions of the underlying data. I could write a wrapper around that and use it in the memoisation?

I didn't think about the memory limitations though. Maybe in what I committed only neuprint_ROI_mesh and neuprint_ROI_connectivity would be worth it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants