Comments (2)
Hi,
Thanks!
There are various reasons that euporie is slower at rendering notebooks than VSCode
and nbviewer.js
:
-
euporie is written in Python, while
VSCode
andnbviewer.js
are written in JavaScript. Python is generally a slower language than Javascript, because nowadays Javascript uses just-in-time compilation to achieve high speeds. -
Both
VSCode
andnbviewer.js
use web-browser rendering engines to display output (VSCode
uses electron which uses blink, andnbviewer-app
will use webkit). Web-browsers are already capable of rendering HTML and images and are extremely optimized for rendering speed.Terminals do not have built-in support for rendering rich output like HTML, SVG, and images. For displaying images in the terminal using ASCII-art style output, I'm relying on external libraries or programs which can convert images to text output faster than can be done in Python. Some formats can require multiple conversion steps, depending on which programs the user has installed (e.g.
svg -> png -> pil -> ansi -> formatted_text
). For rendering HTML, I've written a new HTML renderer for displaying HTML in the terminal, but I've not got round to optimizing this for speed yet, and Python is not an ideal language for writing an HTML rendering engine! -
I've not done much work optimizing notebook rendering yet. For example, in
euporie-preview
, cells are rendered sequentially; it might be much faster to cells using a thread-pool, I've just not had time to try this out yet!
In short, I think it's unlikely that euporie will be as fast as similar tools which use modern web rendering engines to display output, but there is still a lot of potential for speed-ups! It's just going to take time.
There are various (less feature-rich) alternatives which may render notebooks faster then euporie listed here in the documentation which you might be interested in trying.
from euporie.
Hi @joouha, this project is such a great idea! As someone who has terminal centric workflow this project comes in handy.
However as mentioned by @wybert there is some problems when it comes to speed.
-
Do you think that a rewrite in other language would increase the speed in a significant manner or just improving the
rendering would lead to much higher speeds? -
In terms of rich output maybe using nerdfonts as a font requirement could avoid the rendering of some images since
there are +10 000 icons.
Congrats for all the work so far.
Thanks!
from euporie.
Related Issues (20)
- ImportError: cannot import name '_PosixFlavour' from 'pathlib' HOT 2
- Unable to display Latex on foot terminal HOT 7
- Autoformat is not working HOT 2
- Graphics rendering bugs HOT 1
- Latex printing from sympy shows `\displaystyle` and doesn't print using graphics HOT 1
- Custom keybindings for `euporie.notebook.tabs.notebook.Notebook` are not detected
- Scrolling through outputs with keyboard? HOT 3
- euproie makes ptpython not runnable due to an AssertionError HOT 2
- Euporie crashes upon loading notebook HOT 1
- "command" to go to a specific cell (by cell number and line number) HOT 3
- Not detecting kitty image support on Mac, falls back to ANSI HOT 2
- markdonw-it-py version conflict HOT 2
- Love this but it's not working
- Scrolling past top in vim normal mode replaces text HOT 2
- Hover widget displays filenames twice HOT 1
- Installation issues HOT 3
- Non-default color schemes obscure terminal graphics (e.g., Matplotlib plots) in Notebook HOT 3
- Doesn't start HOT 9
- Running `^[` in the console prints a `KeyError` HOT 1
- Error in console HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from euporie.