Performance DimensionElements Function

Hi everyone,‎

we have got issues with the DimensionElements function. ‎
It is not performing as we would like it to.‎

This is our call in js:‎
mdx = “{TM1FILTERBYLEVEL( FILTER ( {FILTER( {TM1SUBSETALL( [IR Company] )}, [IR ‎Company].[Status] <> ‘I’)}, [IR Company].[Main FI] <> ‘’ ) ,0) }“‎
elementsPromise = $tm1Ui.dimensionElements(“dev”, “IR Company”, “Name Short, Main FI, ‎Add FI”,””, mdx,"","", “false”, “false”)‎

It takes 4.38 Seconds to return the response with a size of 35.6 KB
We are talking of 1500 Elements with 3 Attributes.‎

Is there a way to get more speed from Canvas on this one? ‎Are we maybe doing something wrong or inefficiently?

Our setup is Canvas1.1.2 on TM1 10.2.2 FP6 IF 2

Cheers,‎

Marius

Hi Marius,

From the request below:

Change it to:

elementsPromise = $tm1Ui.dimensionElements(“dev”, “IR Company”, “Name Short, Main FI, ‎Add FI”,“”, mdx,“”,“”, false, true)‎

The main parameter I have updated is the last one corresponding to the parameter ‘elementsOnly’. Setting this to true means it should not include each elements Parents / Children in the query.

Let us know how it goes.

Cheers!
Paul

Hi Paul,

thank you for your support.

It doenst get any faster if I change it.

If I understand you right, you are proposing to remove the hierarchical entries from our response.
But currently we dont have any. In the response that I get now in the browser from the /api/dimensions request there is no hierarchy.
its a flat list like this:

{“49c2c5bc-4a2e-149f-4586-586961a59f67”:
[
{“Name”:“1527”,“UniqueName”:"[IR Company].[c1]",“Type”:“Numeric”,“Level”:0,“Index”:487,“Attributes”:{“Main FI”:“12345”,“Name Short”:“Name1”},“TopLevel”:-1},
{“Name”:“2486”,“UniqueName”:"[IR Company].[c2]",“Type”:“Numeric”,“Level”:0,“Index”:1378,“Attributes”:{“Main FI”:“123456”,“Name Short”:“Name2”},“TopLevel”:-1},

]
}

I dont think the connection between the browser and Canvas Server Side is our bottleneck.

I believe Canvas is taking so long, because
a. it is asking TM1 to evaluate all our String Rules that apply for the 1500 Elements in the }ElementAttributes Cubes and
b. loads them from TM1 to Canvas Server Side.

Cheers,

Marius

Hi @mwirtz,

It seems like it is retrieving all the other attributes, instead of just those 3 you have specified.

Please do send a ticket for this.


Paul

Hi Paul, I have created a ticket. It’s #1955

Hi @cw-ch-scott,

Thanks!

Hi @mwirtz,

Just to give more details on this, the root cause of this was due to the attributes having space. And because of that, getting specific attributes were not doable, and therefore Canvas reverted to retrieving all attributes instead

So should you want a workaround, you can try to create a copy of the attributes needed, just make sure that the attribute names has alphanumeric characters only.

Though with TM1 it usually is space and case insensitive, it is a bit different though, through TM1’s REST API. In particular through the OData specification that they are trying to adapt to.

We will review and update the ticket afterwards.

Cheers!
Paul

@mwirtz workaround just remove spaces from the attribute names in the query. To the Tm1 server it will all be the same.

Hi,

I adjusted our dimensionElements call.
Now I specfify the attribute names without spaces.

Now in the request from Canvas Application Server to the TM1 REST API the Attributes are specified explicitly in the URL.
The Reponse from TM1 to Canvas Application Server didnt change though! TM1 still evaluates ALL String rules in the }ElementAttribute Cube and then returns all of them to Canvas Application Server.

Thus performance didnt improve.

@plim I sent you the TM1 REST API Logs for this.

Hi @mwirtz,

Thanks for sending the logs over.

That should make it more and more likely a bug with TM1’s REST API. As it was clear that the response received was for a request that only specify a few attributes via the @odata.context, yet it sent over all the other attributes.

We will report this over to them. In the meantime, which TM1 version did you work this out with?


Paul

Our Version is:
TM1 10.2.2 FP 6 IF 2
or in IBMs words 10.2.20601.100