Forum Discussion
Notebook – input/keypress lagging when writing in code cell
- 1 year ago
Adding on this, I just stumbled upon this page with the limiations on notebooks: https://learn.microsoft.com/en-us/fabric/data-engineering/notebook-limitation
It mentions 256 cells maximum per notebook, so your running close to the upper boundary, which could indicate that your reaching the limit of what's possible within a single notebook item. 🙂
Hi KimTutein ,
I did experience some latency when writing code from time to time as well. At some point I noticed that this tends to occur, when I already have a lot of cells with outputs, especially with
display(df)in my code.
When you revisit your notebooks, is it possible that you make lots of use of displays etc.? Especially the display function is way more than just a print out, since it offers functionalities like exploring the data with charts and using the Data Wrangler. So it is essentially a small UI which offers interactive funtionalities to the user. On the flipside, this can block memory while running the notebook and will consequently slow down the experience.
If you have extensive outputs in your notebook, consider clearing them by navigating to Edit --> Clear all output(s). Additionally, I like to define a variable such as
is_debug_mode = False
if is_debug_mode:
display(df)and relate all outputs to this variable. Then, if I need to see a data frame, I will set the variable to True before running the cell.
Kindly try and let me know if this helped you resolve your performance issues.
If you do not have a lot of outputs in your notebooks, it would be interesting to learn more about the overall structure of your code.
Kind regards,
Niels