question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve perf of the interactive window UI

See original GitHub issue

See info here: https://reactjs.org/docs/optimizing-performance.html

Run something like this:

#%%
import tensorflow as tf
mnist = tf.keras.datasets.mnist

(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(input_shape=(28, 28)),
  tf.keras.layers.Dense(512, activation=tf.nn.relu),
  tf.keras.layers.Dropout(0.2),
  tf.keras.layers.Dense(10, activation=tf.nn.softmax)
])
model.compile(optimizer='adam',
              loss='sparse_categorical_crossentropy',
              metrics=['accuracy'])

model.fit(x_train, y_train, epochs=1000)
model.evaluate(x_test, y_test)

And eventually we slow down so much it’s unusable.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
janoshcommented, Aug 2, 2019

This probably has a separate cause unrelated to React but it still strongly impacts interactive window performance: I’ve noticed that on sessions which create very large variables (like learning histories/traces of ML models) executing even simple cells in the presence of such variables becomes unusably slow just as described here.

Basically, if there is an extremely large variable in the notebook, every single cell will take a very long time to execute (> 5 seconds), no matter how simple the cell contents are. This is because the varInspector function runs the var_dic_list after every single cell execution, and var_dic_list is slow.

Not sure if VSCode Python can do anything about that but I thought I’d mention it.

0reactions
xgdgsccommented, Oct 23, 2019

Thanks. The insider build works pretty well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I make the windows ui/gui faster? - Microsoft Community
Go to Control Panel > Large icon view > System > Advanced System settings > Advanced tab > Performance > Settings. You should...
Read more >
Want to Improve UI Performance? Start by Understanding ...
Our focus was to improve the UI performance. This included a mix of improvements that affected load time, perceived load time, ...
Read more >
35 quick tips to improve web performance | by João Cunha
Following Optimistic UI, remove intermediate states: skip load and go straight to success. ⚡️Tip #15: PRPL. Follow the PRPL pattern: Push critical resources ......
Read more >
13 Tweaks You Can Make to Boost Windows 10 Performance
13 Tweaks You Can Make to Boost Windows 10 Performance · #1. Optimize power plan settings for max performance · #2. Disable startup...
Read more >
Interactive UI slows to a halt over time · Issue #1304 - GitHub
When I initially starts Python Interactive windows and run code through VSCode editor like the following, everything is very fast. image.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found