-
Notifications
You must be signed in to change notification settings - Fork 382
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
Adding class path with wildcard calls resetEnvironment repeatedly, can be very slow #5701
Comments
Hi Joe a fix has been merged to master, though I didn't have a good test for it. |
Yes, that works. I can import the spark lib jars and run a simple session in about 35 seconds on my laptop. For the record, here's what my trivial Spark test notebook looks like.
import org.apache.spark.sql.SparkSession val spark = SparkSession.builder.appName("Beaker").master("local").getOrCreate()
import spark.implicits._ val ds = spark.createDataset(Seq(("this", "that"), ("one thing", "another"))) import scala.collection.JavaConverters._
ds.collect.toMap.asJava spark.stop() |
…ssage_after_succesfully_added_classpath * origin/master: (24 commits) allow whitespace only cells, do not bother chelling for null code #5713 fix multiple clingOutputContainerLayoutManager instances (#5730) #5701 Optimize way of adding multiple jars to classpath. (#5729) #5657 plot tooltip should fade in out (#5705) fix #5711 by adding a readme further separate dev/user docs #5726 Separate install instructions into user and developer (#5727) bump version to 0.1.1 #5715 Showing version of kernel in banner message. (#5719) instructions are for developers not users #5476 recipe in repo for conda forge (#5716) #5680 Renamed example jar resource. (#5717) #5699 pressing escape should close column search menu (#5709) #5698 column search should be case insensitive (#5708) remove the jar from our repo, add instructions to download it jarek/5702: remove tablesaw (#5712) #5703: add default imports (#5707) #5682 fix CyclingOutputContainerLayoutManager causes page to jump around (#5710) #5694 prevent user from dragging legend out of the plot (#5704) add tests for beakerx.widgets package (#5692) ... # Conflicts: # kernel/base/src/main/java/com/twosigma/beakerx/evaluator/BaseEvaluator.java # kernel/base/src/main/java/com/twosigma/beakerx/evaluator/Evaluator.java # kernel/base/src/main/java/com/twosigma/beakerx/kernel/Kernel.java # kernel/base/src/main/java/com/twosigma/beakerx/kernel/KernelFunctionality.java # kernel/base/src/main/java/com/twosigma/beakerx/kernel/commands/MagicCommand.java # kernel/base/src/test/java/com/twosigma/beakerx/KernelTest.java # kernel/base/src/test/java/com/twosigma/beakerx/jupyter/handler/ExecuteRequestHandlerMagicCommandTest.java
This seems to have gotten broken by 9d7150b. |
my fault, should be good now. |
If I use the
%classpath add jar /path/to/dir/*
wildcard mechanism, the default behavior (inBaseEvaluator.addJarToClassPath
, called indirectly byMagicCommand.classpathAddJar
) will end up callingresetEnvironment
once for each jar file.Now, the Scala interpreter is famously slow to start up, which even the most ardent fans will admit. The consequence in my case was that adding 209 jar files (from the Spark
jars
directory) blocked my Scala notebook for over ten minutes. I didn't do actual profiling, but every time I ran jstack I sawresetEnvironment
in the stack, so I'm fairly confident about the cause.The text was updated successfully, but these errors were encountered: