Skip to content

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

Open
romainFr wants to merge 1 commit intomasterfrom
memoise-extra
Open

Use the memoised version of neuprint_fetch in a couple more places#105
romainFr wants to merge 1 commit intomasterfrom
memoise-extra

Conversation

@romainFr
Copy link
Copy Markdown
Collaborator

No description provided.

@jefferis
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants