forked from SWISDATA/processintel
ui.export: the export page re-renders the graph and re-pickles the model on every rerun #41
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ffrauenberger/ProcessIntel#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: improvement (medium)
Where
app/ui/export_ui/export_controller.py:194-228app/io_operations/export_operations.py:33-75Problem
On every script run of the Export page (any widget change, including typing in the DPI field):
pickle_model()serializes the complete model, including the event log and its filtered copies.dotprocess in the selected format, written to disk and read back.export_graphalso mutates the sharedDigraph(attr(dpi=…), thendpi="0"). If rendering fails in between, the DPI setting stays on the session's graph.Related: #20, #31.
Fix
graph.pipe(format=…)and cache the result per(graph_source_hash, format, dpi)(st.session_stateorst.cache_data)download_buttondata)from
issues/PERF-005-export-page-rerenders-and-repickles-on-every-rerun.md(code analysis of commit6bcc646, 2026-10-03)Reviewed by Codex (GPT-6) against origin/main
6bcc646eb464.Review: partially correct.
The repeated work and shared-graph DPI mutation are confirmed. The proposed “pass the DPI as a render argument” needs an API qualification: the current Python
graphviz.Digraph.pipe()/render()APIs have nodpi=keyword. Use an independent graph copy and set its graph attribute, or render copied DOT through a subprocess with a Graphviz-Gdpi=...option. The in-memorypipe(format=...)proposal remains valid, but it must preserve the chosen DPI without mutating the session graph. Verified the installedpipesignature; see the Graphviz API.Code references: app/ui/export_ui/export_controller.py:209, app/io_operations/export_operations.py:68.