Description
The following code takes 20 seconds in zeppelin python interpreter. But it only take 1 second in jupyter.
import matplotlib.pyplot as plt import numpy as np x = np.random.normal(0,1,1024) y = np.random.normal(0,1,1024) plt.scatter(x,y, s=25) plt.xlim((-2,2)) plt.ylim((-2,2))
It looks like most of the time is spent on sending image to client.
DEBUG [2017-01-03 21:02:05,284] ({pool-2-thread-2} PythonInterpreter.java[sendCommandToPython]:248) - Sending : import matplotlib.pyplot as plt import numpy as np x = np.random.normal(0,1,1024) y = np.random.normal(0,1,1024) plt.scatter(x,y, s=25) plt.xlim((-2,2)) plt.ylim((-2,2)) z._displayhook() DEBUG [2017-01-03 21:02:05,507] ({pool-2-thread-2} PythonProcess.java[sendAndGetResult]:114) - Read line from python shell : <matplotlib.collections.PathCollection object at 0x106f5eb10> DEBUG [2017-01-03 21:02:05,532] ({pool-2-thread-2} PythonProcess.java[sendAndGetResult]:114) - Read line from python shell : (-2, 2) DEBUG [2017-01-03 21:02:05,557] ({pool-2-thread-2} PythonProcess.java[sendAndGetResult]:114) - Read line from python shell : (-2, 2) DEBUG [2017-01-03 21:02:05,557] ({pool-2-thread-2} PythonProcess.java[sendAndGetResult]:114) - Read line from python shell : %html DEBUG [2017-01-03 21:02:05,619] ({pool-2-thread-2} PythonProcess.java[sendAndGetResult]:114) - Read line from python shell : <div style='width:auto;height:auto'><img src=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQCAYAAAByNR6YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAIABJREFUeJzsvX10XFd57/8djzU+9agXTAHHmLx45ER2pNFoHGJhglcTGWQUjxteTImjAdZiFegqK21viiXnxmNJIy4Jt782LeUPktWWdaGshEscTe4omcrtunF/rFxbWU1kYi7ppUkI... DEBUG [2017-01-03 21:02:05,620] ({pool-2-thread-2} PythonInterpreter.java[sendCommandToPython]:254) - Got : <matplotlib.collections.PathCollection object at 0x106f5eb10> (-2, 2) (-2, 2) %html.. INFO [2017-01-03 21:02:19,754] ({pool-2-thread-2} SchedulerFactory.java[jobFinished]:137) - Job remoteInterpretJob_1483448524770 finished by scheduler org.apache.zeppelin.python.PythonInterpreter789681602
Attachments
Issue Links
- duplicates
-
ZEPPELIN-1360 Printing long strings is very slow in the python interpreter
- Resolved
- is duplicated by
-
ZEPPELIN-2160 PySpark: Matplotlib Integration extremely slow
- Open
- links to