I have developed a document management system while using the MBS Plugin. Everything is working perfectly fine except WAN Performance of my Document Browsing.
I have Tags on the documents which help with the browsing: you click a tag and the portals show documents which have this tag.
You chose a second one: the portal shows only those documents which are tagged with "both" of the Tags.
I have a Field that is called CheckTagOccurence_n and it is calculated to be 1 if the tags chosen are all in the documents tags. So the Portal is filtered by this Field.
I thought it might be the calculated content that took so long but after tests without media filed and indicated fields instead of calculated it took the same time to show them (about 10 seconds with about 1000 Documents in the database)
So I think it must be the CheckTagOccurrence calculation which makes it so slow:
It's a little bit complicated because I totally came up with this on my own:
I have a multilinekey-field which is global and where the tag uuid "choice" is written in. This is List 1
I have a TagList field which contains all the Tag's UUID's of a document. Context of calculation is the documents table for the Portal to show. This is List 2
I have a AntiFilterList which uses FileMaker Custom Function:AntiFilterValues( ListA; ListB )
It is List 2 without List 1 > List 3
The CheckTagOccurence Calculation is:
If (ElementsCount(List2) + ElementsCount(List3) = ElementsCount(List1); 1;0)
With This Calculation it took me 10-15 seconds to get the data I wanted.
The Portals relationship is based on the MultilineKey- List 1. It is filtered by the check Tag occurrence.
Is there a possibility that this might be faster with SQL?
I also Tried something else: instead of the Sum of ListElements Calculation I chose a MBS Function which simply gives Back an "AND" / InnerJoin of the two Lists 1 and 2.
This also worked but was 3-4 times slower. (45-60 seconds)
I highly appreciate any help and I plan to give it back