Alex Goodman created ZEPPELIN-1360:
--------------------------------------
Summary: Printing long strings is very slow in the python
interpreter
Key: ZEPPELIN-1360
URL: https://issues.apache.org/jira/browse/ZEPPELIN-1360
Project: Zeppelin
Issue Type: Improvement
Components: Interpreters, python-interpreter
Affects Versions: 0.6.1
Reporter: Alex Goodman
Fix For: 0.7.0
Printing really long strings is very slow:
{code}
s = 's'*100000
{code}
This is particularly the case for the python interpreter:
https://puu.sh/qLHA7/0a5f2ac5b3.png
The pyspark interpreter is much better:
https://puu.sh/qLI9x/1ae5cc4e18.png
But this is still very slow compared to running the command in an actual python
shell, which takes just a few milliseconds.
This is a very relevant issue for matplotlib integration (ZEPPELIN-1344), which
requires us to express raster image as a byte array if we wish to support
inline plotting in a notebook. You can easily verify this by using {{z.show()}}
with the python interpreter. In the simplest case, you may use
{code}
%python
import matplotlib.pyplot as plt
import numpy as np
plt.contourf(np.random.random((100, 100)))
z.show(plt)
{code}
And notice that this will take a few minutes to run. This is because more
complicated plots will require a greater number of characters to represent the
image in byte string form.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)