Ideas for Saving Previous Queries #352
Replies: 5 comments 9 replies
-
I think I briefly considered trying to work on this using something like the memoise package. I think it's a great idea, but I think we'd need to devote some time looking into how to best implement it. I don't personally have any experience with memoisation or caching, so I'd need to do some learning to even know how feasible this is. |
Beta Was this translation helpful? Give feedback.
-
Definitely interested in hearing your ideas though! |
Beta Was this translation helpful? Give feedback.
-
Thanks @BradyAJohnston for opening this discussion, I think implementing a way to quickly recover results would add a lot to the package! I'm currently using the package for querying info about thousands of chemicals and what I currently do to make my life easier is cache the results using Thanks @Aariq for linking the memoise package, I think using a package that is already out there is probably better than finding our own way around this. Perhaps, we could have an argument in our functions where we specify whether we want to cache results or not and if we do we can cache them using the package? |
Beta Was this translation helpful? Give feedback.
-
I've been using memoise in conjunction with webchem (thanks to this post!). It seems like it might be kind of complicated to integrate memoisation into the package, but I wonder if it would be worth pointing out this possibility prominently in the documentation somewhere? It can really speed things up if you are trying run a list of queries where there a lot of repeats (and also reduce the number of calls to the server). |
Beta Was this translation helpful? Give feedback.
-
Thanks @ethanbass, I would prefer incorporating some kind of caching mechanism in the functions. The approach I described earlier was implemented in |
Beta Was this translation helpful? Give feedback.
-
I am looking to try and incoroprate webchem into another package, for doing calculations for buffer solutions and other mass/molarity calculations. Currently works great for this, but I was wondering if any of the developers had any ideas for saving previous queries, so that the second time the user searched "potassium chloride" etc, you wouldn't have to query the online databases and could instead match it to a local set of previously used options.
I have a couple of ideas of how I might implement it, but I was wondering if any of the developers had an idea that might use the webchem internals some more.
Thanks for all the hard work in making this great package so far!
Beta Was this translation helpful? Give feedback.
All reactions