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

Caching taxonomy object model? #7

Open
ValeriyTitov opened this issue May 16, 2018 · 2 comments
Open

Caching taxonomy object model? #7

ValeriyTitov opened this issue May 16, 2018 · 2 comments

Comments

@ValeriyTitov
Copy link

ValeriyTitov commented May 16, 2018

For me, this line of code take about 30 second to complete (it parse hundreds of files)
SchemaSet.cs

public void Compile()
        {
            thisSchemaSet.Compile();
        }

As i understand, it parse xml files in Taxonomy to create Object model of Taxonomy.
After object model is built, Gepsio load all possible facts from instance document.

So, for each instance of xbrl report Gepsio doing same thing - Creating object model of Taxonomy from the scratch. But if multiply xbrl-Instance files reference same Taxononmy, it not nessesary to create this.

var doc = new XbrlDocument();
doc.Taxonomy.Build("http://example.com/Taxonomy.xsd");
doc.Taxonomy.SaveToSteam(Stream);
doc.Load("Instance.xml");

var doc2 = new XbrlDocument();
doc2.Taxonomy.LoadFromSteam(Stream);
doc2.Load("Instance2.xml");

It will be my problem, if taxonomy mismatch.
Or is there something i misunderstood ?

@JeffFerguson
Copy link
Owner

You're certainly right. There is definite room for improvement there. Gepsio could take the performance hit on the first compilation, but store the compiled results for future XBRL instance loads.

We could also take this one step further, if necessary. The schemas never change, once published. Once compiled, perhaps the results of the compilation could be serialized to disk so that they could be loaded more efficiently during subsequent runs. For a given schema, the schema set compilation output will never change, even between different processes running Gepsio. Can the results be stored somewhere on disk so that no compilations are ever again needed for a particular schema with a particular namespace? It's worth thinking about.

@KacperJab
Copy link

Hi,
I have a question regarding this topic. How can I view the taxonomy model (i.e. ESEF IFRS taxonomy) using gepsio?

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

3 participants