DeepSeeWeb icon indicating copy to clipboard operation
DeepSeeWeb copied to clipboard

Research DeepSee Rest API - instead MDX2JSON

Open Lena-Ev opened this issue 2 years ago • 13 comments

  • [ ] Methods list with possible realization MDX2JSON and DeepSeeRest API

DeepSeeRest API <- MDX2JSON <-DeepSee Web DeepSeeRest API <- DeepSee Web

Try to use both technologies at the same time

Lena-Ev avatar Nov 30 '22 11:11 Lena-Ev

list of all the methods and classes

Lena-Ev avatar Mar 21 '23 11:03 Lena-Ev

@jakcpto

Lena-Ev avatar Mar 28 '23 10:03 Lena-Ev

@jakcpto check slow-loading dashboard ask Eduard

Lena-Ev avatar Mar 28 '23 10:03 Lena-Ev

List of all mdx2json methods https://docs.google.com/spreadsheets/d/1Vp3LJ-L-zo87J6lViVy7AHutkWtgG0YXoGIZL01sj68/edit?usp=sharing

Lena-Ev avatar Apr 04 '23 10:04 Lena-Ev

Spreadsheet were updated with time spend on run for each method. Used widget: Screenshot 2023-04-11 142118

Frisle avatar Apr 11 '23 08:04 Frisle

new test case - result set mdx-> result set DeepSee

Lena-Ev avatar Apr 11 '23 10:04 Lena-Ev

https://analytics.community.intersystems.com/reports/index.html#/DC/IRIS_BI/En

Lena-Ev avatar Apr 11 '23 10:04 Lena-Ev

I consulted with Eduard about the topic. He suggested a profiling method to gather precise statistic from result set and after that he can help with picking the right method to replace the old one

Frisle avatar May 02 '23 08:05 Frisle

Here is a solution to optimize slow loading widgets. This method tries to figure out which cell should not be displayed. The commented lines are the ones that have been optimized.

The method was tested on a widget with 12000 rows. Before optimization load time was 30+ seconds, after ~7 seconds.

Method IsCellNull(Cell)
{
    #; Return:((Cell.type = "axis") || (Cell.type = "set")) 1 // for top-level cells

    return:(Cell.caption=0) 1 // typical caption for top-level cell
    return:(Cell.caption=1) 1 // typical caption for top-level cell
    return:(Cell.caption="") 1 // typical caption for top-level cell
   
    set children = Cell.children

    return:(($isobject(children)) && ($$$ListSize(children)>0)) 0 // cell has children
    
    return:(Cell.vis '= 0) 0 // in case of type='lit'. cell 'lit' is always vis=0 so we can skip it

    #; If (Cell.type'="lit") {
	#; 	Set key = $ORDER($$$DeepSeeResultsGLVN(..%CubeKey, ..%QueryKey, "leaf", AxisNumber, ""))
	#; 	While (key'="") {
	#; 		Return:(Node=$$$DeepSeeResultsGLVN(..%CubeKey, ..%QueryKey, "leaf", AxisNumber, key)) 0 //for leafs
	#; 		Set key = $ORDER($$$DeepSeeResultsGLVN(..%CubeKey, ..%QueryKey, "leaf", AxisNumber, key))
	#; 	}
	#; } Else {
	#; 	/// lit cell: SELECT %LABEL("Const","Title") ON 0 FROM [HoleFoodsBudget]
	#; 	/// but also a lot of top-pevel cells
	#; 	Return 'Cell.vis
	#; }

    return 1
}

Frisle avatar May 05 '23 13:05 Frisle

So progress has been made without implementing DSZ methods, these are purely tweaks in the result set. As @evshvarov pointed out the advantage of DSZ is now around 20 seconds in between API in case of very big pivots (2.35m DSZ vs 2.50m MDX2JSON). Should we continue attempt to replace MDX2JSON with DSZ or we should optimize Result Set futher?

Frisle avatar May 08 '23 13:05 Frisle

DC report: Views dynamic by members post

Lena-Ev avatar May 09 '23 10:05 Lena-Ev

add to Excel table what can be done with REST API and what can be done only with MDX2..? If it is possible then what are the obstacles? | REST API | MDX2... -yes,

Python?

Lena-Ev avatar Jun 27 '23 10:06 Lena-Ev

duplication of functions of API additional functions to API gap of deepsee rest UI for deep see web


Estimation of work

Lena-Ev avatar Jul 17 '23 09:07 Lena-Ev