Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagram takes lots of memory for a large ontology #17

Open
VladimirAlexiev opened this issue Sep 9, 2024 · 4 comments
Open

diagram takes lots of memory for a large ontology #17

VladimirAlexiev opened this issue Sep 9, 2024 · 4 comments

Comments

@VladimirAlexiev
Copy link

Get https://www.entsoe.eu/Documents/CIM_documents/Grid_Model_CIM/IEC61970-600-2_CGMES_3_0_1_ApplicationProfiles.zip
Take this ontology v3.0/RDFSEd2Beta/IEC61970-600-2_CGMES_3_0_0_RDFS_501Ed2CD_EQ.rdf
It's 528k rdf, 384k ttl (converted with jena riot).

java -jar c:/prog/bin/owl-cli-snapshot.jar diagram IEC61970-600-2_CGMES_3_0_0_RDFS_501Ed2CD_EQ.ttl

On Windows 11, this takes 1.2G "private bytes" of memory and 370M "working set" (and growing).
It's been running for a few minutes now , but the svg remains empty.

I question the wisdom of trying to make a diagram from a large ontology (this one is actually mid-size), so maybe it's a user's problem...

@VladimirAlexiev
Copy link
Author

@atextor Sorry, wrong project! Can you move this to https://github.com/atextor/owl-cli, or I should recreate it there?

@atextor atextor transferred this issue from atextor/turtle-formatter Sep 10, 2024
@atextor
Copy link
Owner

atextor commented Sep 10, 2024

Hi @VladimirAlexiev,
I have moved the issue to owl-cli.
Thanks for reporting. We should probably investigate the memory usage, and especially when no output is produced.
Still I expect that for an ontology of this size you can't create a useful diagram. Even when the SVG generation works, you'd still need to have a viewer deal with it.
The diagram feature was originally intended for smaller parts of an ontology (e.g., to show the relationships between 5-10 classes/properties/restrictions).
owl-cli should provide a convenient way to select subsets of a larger ontology; you can of course already do this using some preprocessing, but it's tedious.

Some improvements are probably necessary to have the feature "just work" for any ontology, be it schema-heavy, instance-heavy and of various sizes.

@VladimirAlexiev
Copy link
Author

Do you have some examples? I'd love to see some diagrams of the Bosch Stack

@atextor
Copy link
Owner

atextor commented Sep 10, 2024

Since you're asking, let me give you some background on the diagram functionality.
I invented the diagram notation out of necessity as a by-product when writing my PhD thesis to be able to express ontologies - including all types of axioms - in a readable but precise way (as opposed to some UML-esque approximation). It is supposed to be a lot easier to read than long listings of description logic notation. Due to a lack of time, I manually created the required diagrams then, but always planned to be able to generate them automatically.
In owl-cli I implemented this automatic generation (way after the thesis was finished :-)) but still with the focus on diagrams that comfortably fit on a screen or an A4 page.
I think for bigger graphs, approaches that are more interactive than static diagrams might be better suited; with panning/zooming/filtering/dynamic layouts etc.

That being said, Bosch Semantic Stack is not affiliated with owl-cli, I just happen to work on both. But similar problems were and are still addressed in the context of Bosch Semantic Stack as well: large parts of its modeling infrastructure are developed as Open Source in the Eclipse Semantic Modeling Framework, which also includes a command line tool that generates automatically-layouted diagrams from RDF-based model files (but using the SAMM format instead of OWL).
Examples for these files you can find in the models repository of the Eclipse Tractus-X project, including an HTML diagram for each model file that also includes a generated diagram (in the gen folder of each model, for example here).
tl;dr: The above link contains examples for models and diagrams that are related to Bosch Semantic Stack since both Tractus-X and Bosch Semantic Stack use the same model formalism (SAMM), but it's not OWL and it's not generated using owl-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants