pyiron / ironflow

Prototype of a graphical user interface for pyiron (unstable)
https://mybinder.org/v2/gh/pyiron/ironflow/HEAD?labpath=example.ipynb
BSD 3-Clause "New" or "Revised" License
16 stars 2 forks source link

More performant logging #179

Closed liamhuber closed 1 year ago

liamhuber commented 1 year ago

Using ipywidgets.Output with append_stdout scaled absolutely terribly as the log history grows. There is still a bit of scaling in node instatiation time as the number of nodes in the flow gets bigger, but this happens even with the logging off and not re-routed to the gui, so I believe it is unrelated.

ipywidgets.Output.append_stdout and the corresponding updates to the widget was really taking on the order of seconds once the log had hundreds or thousands of lines in it. HTML brings this down to a couple hundred ms for a big node (CalcMurnaghan) in an existing graph (the ontology example), almost independent of how long the log is.

At the end of the day, writing stdout is just expensive and turning off the ryven logger drops the cost from O(100ms) to O(10ms) -- i.e. from annoying but usable to very snappy and responsive. Of course we still need the log, but I'm going to turn it off by default. Errors, etc. will still get written, just not the ryven "INFO" stuff.

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a binder notebook on branch _pyiron/ironflow/more_performantlogging