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

Cell caching #248

Open
JanPalasek opened this issue Aug 25, 2022 · 6 comments
Open

Cell caching #248

JanPalasek opened this issue Aug 25, 2022 · 6 comments

Comments

@JanPalasek
Copy link

Would it be possible to add cell caching to speed up repeated executions? Something similar to what knitr does in R.

@davidbrochart
Copy link
Member

This is something that can be solved at the kernel level, and akernel tries to support that.
Is it what you have in mind?

@JanPalasek
Copy link
Author

I think so. Im curious how input inference is reliable. Seems like a task that would need a python expression parser.

@davidbrochart
Copy link
Member

It uses the ast module, and it assumes that an output is a variable that is assigned to, and an input is any variable that is accessed.

@JanPalasek
Copy link
Author

@davidbrochart That's awesome! Do you think it would be possible to integrate it to ipykernel directly? So everyone could benefit from this functionality? Imho a lot of Jupyter projects would benefit from that.

@davidbrochart
Copy link
Member

That's awesome!

Thanks!

Do you think it would be possible to integrate it to ipykernel directly?

It's not that easy, ipykernel is the main Python kernel and should be very stable. But it is worth trying, do you want to open an issue there and start a discussion about it?

@JanPalasek
Copy link
Author

That's awesome!

Thanks!

Do you think it would be possible to integrate it to ipykernel directly?

It's not that easy, ipykernel is the main Python kernel and should be very stable. But it is worth trying, do you want to open an issue there and start a discussion about it?

Ye, that would be great. If that fails, there might be a backup plan for caching on a bit higher level. I suggested something here: executablebooks/jupyter-cache#89 . Tho it's probably not as good as your implementation since it's higher above the kernel.

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

No branches or pull requests

2 participants