Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gen-markdown-datadict reads every element on reloads - O(n) #3637

Open
Assignees
Labels
bugSomething that should work but isn't, with an example and a test case. community-generated generator-markdown-datadictMarkdown data dictionary generator

Description

Describe the bug

MarkdownDataDictGen._generate_class_diagram() instantiates a new ERDiagramGenerator (and therefore a new SchemaView) for every class. On any moderately large schema the generator effectively hangs.

No caching / no reuse.

Version of LinkML you are using
1.11.1

Reproducer

mkdir -p /tmp/mdd && cd /tmp/mdd
uv run python - << 'PY'
print('id: https://example.org/big')
print('name: big')
print('prefixes:')
print(' linkml: https://w3id.org/linkml/')
print('imports:')
print(' - linkml:types')
print('default_range: string')
print('classes:')
print(' Base:')
print(' attributes:')
print(' id:')
print(' identifier: true')
for i in range(500):
 print(f' Klass{i}:')
 print(f' is_a: Base')
 print(f' attributes:')
 print(f' ref:')
 print(f' range: Klass{(i+1) % 500}')
PY > schema.yaml
time uv run gen-markdown-datadict schema.yaml -d out # many minutes

Metadata

Metadata

Labels

bugSomething that should work but isn't, with an example and a test case. community-generated generator-markdown-datadictMarkdown data dictionary generator

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /