Repository navigation
fix(layout): elkjs takes no layout it would hold the host for, and the diagram says why - #272
Merged
Merged
Conversation
…product prices layouts with its own rates elkjs runs on the extension host's thread. A layout the server did not answer was already refused when elkjs was estimated to need more than the server's timeout and more than a minute. A graph opened without Java, or with the engine set to elkjs, still went to elkjs whatever its size: one function of 6,172 nodes in mlir-viewer was still laying out after 35 minutes. - The rule is one now: whoever was to lay a graph out, elkjs takes it only within that estimate. Past it the layout is refused, and the message says why the server did not lay the graph out (it timed out or failed, it is not running and why, elkjs is the engine chosen, or the graph asks for an algorithm the server has not). - With elkjs chosen the switch stands before elkjs too. It starts no server. - A product names the rates it measured on its own layout options (DiagramProfile.elkServer.rates, ElkServerOptions.rates). The engine choice, the refusal and the log go by them. The rates of the platform price that function at 24 s on elkjs, the rates mlir measured at 12 min. - A java that is not there is reported as one that could not be run, with the error of the system, not as a server slow to start. Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
…s turned up - The most elkjs may be estimated to take is a minute, whatever the timeout of the server (ELKJS_BUDGET_MS, elkjsTakeoverMs is gone). A timeout raised to ten minutes for large server layouts let elkjs hold the host as long, and with elkjs chosen the budget was a setting of a server never started. - A server that cannot start says what it failed on. A java that ends as it starts (one before 17) exited with its code and its last line. It was reported as slow to start, and that text reaches the status line now. Each reason names Java 17. - The reason "the layout engine is set to elkjs" is given for that choice alone. - The rates of a profile are checked: both engines, four finite numbers that are not negative. Others are said in the log and left out, where one missing failed every layout and one that is no number switched off the engine choice and the refusal. - One set of rates prices every layout of a product, and the API says so: a product that lays out with the presets of the platform names none. The sidecar profile input keeps offering none. - The two declarations of the rates shape are held equal at compile time. - The comments of the server process no longer promise that a missing server leaves every layout to elkjs. Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
Owner
Author
|
Review at medium effort: nine findings, eight changed something, in the second commit.
|
A refused layout is said in a StatusAction. GLSP draws that as an icon in the top left corner and shows the words only under the pointer, and in mlir-viewer the icon lies under the outline button. So the reason a layout was not run was on the page and not on the screen. status-line.css makes a status with words a line at the bottom left of the canvas, in the look of the loading pill, and draws nothing for a status without words. The line keeps to the left of an open outline panel. A product with a stylesheet of its own imports the sheet alone. Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
A layout that runs past its time cannot be taken back from the ELK server. The client closed its socket and the server stayed on the layout: after a graph of 6,172 nodes timed out at 120 s, the Java process was still at a full core and a gigabyte of heap minutes later, with the next layouts going to the same server. Such a server is retired, as one that overflowed its stack is: it answers what else it was asked, is then ended, and the next layout starts another. The timeout is an error of its own (ElkServerTimeoutError), so that only a server still at work is ended, not one whose layout failed otherwise. Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
…the crumbs
The server process:
- Only a server that had a minute or more for a layout is ended when the
layout times out (ELK_SERVER_STUCK_MS). A shorter timeout is a wish to see
elkjs sooner, and a JVM ended at every layout never gets warm.
- An answer that arrived while the host was busy is read before the timeout
is called.
- A layout that timed out and overflows the stack later no longer ends a
layout another diagram still waits for (abandoned layouts are counted).
- The reason of a JVM that ends as it starts is the line naming its
exception, not the frame under it, read after the error stream is. Java
17 is named only where the error is a class file version.
The status line:
- A row above the crumbs, which have the bottom left too, and clear of the
property panel as they are. At the top left while the chat card is shown.
- Only a warning or an error is drawn. GLSP says its own progress there
("Model loading in progress"), which the loading indicator tells.
- The note of a rough layout is a warning, so that it is on the line.
- A fit keeps the drawing clear of the line.
Rates that are all zero for an engine are left out as unusable.
Claude-Session: https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY
Owner
Author
|
Second review at medium effort, of the whole pull request after it grew by the status line and the ended server: nine findings, handled in 4th and 5th commits.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
What elkjs may be handed, and what the reader is told when a layout is not run. All of it was found on the live check of stage 8.5b in mlir-viewer.
elkjs takes no layout it would hold the host for. #270 refused a layout the server was asked for and did not answer, when elkjs was estimated to need more than the server timeout and more than a minute. A graph opened without Java, or with
layout.engineset toelkjs, still went to elkjs whatever its size. The rule is one now. Whoever was to lay a graph out, elkjs takes it only when it is estimated to finish within a minute (ELKJS_BUDGET_MS), whatever the timeout of the server, and past that the layout is refused. The message says why the server did not lay the graph out:With
elkjschosen the switch now stands before elkjs too. It starts no server.A product prices layouts with its own rates (
DiagramProfile.elkServer.rates,ElkServerOptions.rates). The rates of the platform were fitted to its own layout options. mlir-viewer lays out with a configurator of its own, and on one function of 6,172 nodes (5,960 in one block) the two are far apart:So a server that did not answer handed elkjs that layout where a refusal was due. A product that measured its layout names its rates beside its jar. The engine choice under
auto, the refusal and the log line go by them. A product that names none is priced as before.A server a layout timed out on is ended. The same function went to the Java server under
autoand timed out at 120 s. The client closed its socket and the server stayed on the layout: five minutes later the process was still at a full core and a gigabyte of heap, with the next layouts going to it. A layout cannot be taken back from the server, so a server that had a minute or more for the layout (ELK_SERVER_STUCK_MS) is retired, as one that overflowed its stack is (#271). It answers what else it was asked, is then ended, and the next layout starts another. With a shorter timeout the server is left to finish, so that a JVM is not ended at every layout.The status line is read without the pointer (
status-line.css). A refusal is said in aStatusAction. GLSP draws that as an icon in the top left corner and shows the words only under the pointer, and in mlir-viewer the icon lies under the outline button. So the reason was on the page and not on the screen, in every product. A warning or an error is now a line at the bottom left of the canvas, a row above the crumbs, in the look of the loading pill. It keeps clear of the property panel and of an open outline panel, goes to the top left while the chat card is shown, and a fit keeps the drawing clear of it. GLSP's own progress in the same place ("Model loading in progress") is not drawn, since the loading indicator tells it, and the note of a rough layout is a warning now so that it is on the line.A server that cannot start says what it failed on. A
javathat is not there was reported as a server that "did not start within 15000 ms". It is now one that could not be run, with the error of the system, and ajavathat exits as it starts (one before 17, an option it does not know) says so with the line that names the error.What changes for the products
sv-ide, vhdl-ide, chisel-ide, ndf-ide and ac-ide name no rates, so their estimates stay. What changes for them is the refusal without a server: a graph elkjs is estimated to need more than a minute for is no longer laid out when Java is missing or
layout.engineiselkjs, and the timeout of the server no longer raises that minute. Their setting texts say "Without a running server elkjs lays out every diagram" since today, and get a follow-up each.Not in this pull request
A large graph of another algorithm than layered (force, stress) has no estimate, so elkjs is not refused it. There is no measurement to set a size by yet.
Checks
npm run typecheck,npm run check:neutrality,npm test(all packages) andnpm run buildpass.elk-server.test.ts: the refusal with no server (with and without a reason), with elkjs chosen, for a graph of an algorithm the server has not, the engine choice and the refusal by product rates, the reason of a failed start (failure), and the factory with elkjs chosen.profile-elk-server-options.test.ts: the rates of a profile go through, and none is named for a profile without them.status-line-css-split.test.ts: the words are shown for a warning or an error only, the line is above the crumbs, clear of the property panel and of an open outline, at the top left with the chat card, an overlay for Fit, and its colours are the theme's.mainof Top_SW_array, 6,172 nodes, estimated at 12 min on elkjs by the rates of mlir): refused after a server timeout of 200 ms, with Java missing, and with the engine set toelkjs, each with its own reason on the status line. Underautowith the default timeout the server ran its 120 s, the layout was refused, and the server was ended.https://claude.ai/code/session_01EToj6NxqLABK3H5cucHNsY