LearnNewsExamplesServices
Frontmatter
id8075
titleOptimize Markdown Component Rendering
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 9, 2025, 11:54 PM
updatedAtDec 10, 2025, 12:28 AM
githubUrlhttps://github.com/neomjs/neo/issues/8075
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtDec 10, 2025, 12:28 AM

Optimize Markdown Component Rendering

tobiu
tobiu commented on Dec 9, 2025, 11:54 PM

Replace the brittle setTimeout logic in src/component/Markdown.mjs with a VDOM-synchronized approach. Current implementation uses an arbitrary timeout (100ms/150ms) to wait for VDOM updates after inserting lab divs.

Proposed solution: Use await me.set({html: me.insertLabDivs(html)}) which returns me.promiseUpdate(), ensuring the VDOM update cycle is complete. Add a small buffer await me.timeout(10) to ensure rendering in the next frame.