Arelle / ixbrl-viewer

The Arelle iXBRL Viewer allows Inline XBRL (or iXBRL) reports to be viewed interactively in a web browser. The viewer allows users to access the tagged XBRL data embedded in an iXBRL report.
Other
100 stars 60 forks source link

Viewer hanging with specifc ESEF iXBRL instance #358

Closed gmongelli closed 1 year ago

gmongelli commented 1 year ago

What happened?

When opening a specific ESEF iXBRL instance in the iXBRL Viewer, the iXBRL Viewer keeps loading forever when Chrome is used:

Chrome 108 hanging

In Firefox, the document is loaded, but at the end (at least for versions 1.1.31 and 1.1.38), the fact details are not correctly shown.

What did we expect to happen?

The iXBRL Viewer displays correctly the document and the fact details are correctly shown.

In Firefox we observe:

Firefox 108

ESEF instance exhibiting the issue

See stef-2022-12-31-FR.zip

A generated iXBRL viewer file is stef-2022-12-31-FR_ixbrlview.zip

Browser instances used for the tests

iXBRL Viewer versions tested:

1.1.38: document is loaded in Firefox, but selecting an XBRL fact does not work properly on the given instance, inline frame not tested. 1.1.31: same as 1.1.38, but fact selection works fine in inline frame (see screenshot).

Many thanks for your help,

Greg

paulwarren-wk commented 1 year ago

I think the problem is caused by the fact that this document has over 70,000 <ix:continuation> elements, despite only having a few hundred facts.

From a quick inspection of the document, I think most of the continuations are completely unnecessary, as they appear to be selecting contiguous sections of the document. It looks as though they've attempted to exclude all HTML tags from the content of the ix:continuation elements, which is pointless as the facts are not using escape="true" so the HTML tags will be dropped anyway.

Even if we could get the load performance fixed (which I cannot see how to do), I think the results would be unusable due to the number of separately highlighted pieces of text.

I suspect that the best that we can do here is to detect the excessive number of continuation elements, display an error, and stop trying to process the document.

gmongelli commented 1 year ago

Hi @paulwarren-wk ,

Yes, any feedback given to the end-user is better than the endless loop.

We would be very grateful for any improvement!

Best regards,

Greg

gmongelli commented 1 year ago

Thanks a lot to all contributors!

The warning is a minimal improvement, but at least the users know what is going on.

Best regards,

Greg