my farik map viz is too slow

140 is too many. That'll load at the same speed as a list with 140 records displayed.

Your only option is to either show less records, or to use the "defer loading" option, so the marker loading happens via AJAX after the page has loaded.

-- hugh
 
i'm enable fabrik debug and joomla debug...please see that's two link in my previous post.one of redirect to my map viz and another redirect to table view.you can see many different between loading speed in this two page.even you set to show 100 record in the pagination in list of record.in few days ago when i have almost 110 record, map viz page has a very better speed...
please see the fabrik debug in my web...
of course when i use defer loading the page is loaded but the map still to loading the markers and can't load any of that even after 1 min. i see in the debug whole of the table is return, why this is happening? in the map we only need the map coordinate and title.why return all field for each row in the fabrik debug "map" collapsing row?
thank you hugh
 
Fabrik can't know what you will need from your list elements (e.g. in the bubble template).

You can copy your list, remove all joins (if you have any and don't need the information), disable all element you don't need and use this list in your map.
 
i'm do this. (already i was prepare the lowest element list that copied from main list for render json for my android app).
but not more effect on speed(remove any join such as image element and unpublish all unnecessary element.)
what is "map" collapsing row in the fabrik debug? it,s most likely table:data in fabrik debug and it seems many effect on speed.it's repeated data from data:table and the main difference between map page and list page.
 
The 'map' debug is just the data structure the map markers are built from. Which is derived from the list's data.

I suspect most of your time is being lost in things like testing canEdit/canView etc and rendering elements you don't use in the map. So as Troester says, copy the list (select it in the backernd Lists tab and press the Copy button), then in the copy, unpublish all the elements you don't need, or individually set them to not be included in the list query.

-- hugh
 
The 'map' debug is just the data structure the map markers are built from. Which is derived from the list's data.

I suspect most of your time is being lost in things like testing canEdit/canView etc and rendering elements you don't use in the map. So as Troester says, copy the list (select it in the backernd Lists tab and press the Copy button), then in the copy, unpublish all the elements you don't need, or individually set them to not be included in the list query.

-- hugh
i copy the new list from source list and unpublished unnecessary element. then go to each element and set include in list query to no.
but i have many :
Application: runPlugins: start: onCanEdit
Application: runPlugins: end: onCanEdit
almost 1140 "onCanEdit" find in the page joomla debug console->profile information
look at the pic
2017-06-22_11-20-56.jpg
 
It seems when loading the map data
1. it doesn't matter if element is set to show in list data, all elements are rendered
2. if an element has a link to details or custom link enabled you can see this start/end.onCanEdit x times per element (x= number of records), whereas every ..start... is about 34ms
3. although my list is set to nobody for any access but list view it's doing
Zeit: 0.06 ms / 6207.34 ms Speicher: 0.001 MB / 19.94 MB Application: runPlugins: start: onCanEdit
Zeit: 0.02 ms / 6207.36 ms Speicher: 0.002 MB / 19.95 MB Application: runPlugins: end: onCanEdit
Zeit: 0.03 ms / 6207.39 ms Speicher: 0.000 MB / 19.95 MB Application: runPlugins: start: onCanSelectRow
Zeit: 0.02 ms / 6207.41 ms Speicher: 0.002 MB / 19.95 MB Application: runPlugins: end: onCanSelectRow
Zeit: 0.01 ms / 6207.43 ms Speicher: 0.000 MB / 19.95 MB Application: runPlugins: start: onCanDelete
Zeit: 0.02 ms / 6207.45 ms Speicher: 0.002 MB / 19.95 MB Application: runPlugins: end: onCanDelete
Zeit: 0.09 ms / 6207.54 ms Speicher: 0.001 MB / 19.95 MB Application: runPlugins: start: canSelectRows
Zeit: 0.02 ms / 6207.56 ms Speicher: 0.002 MB / 19.95 MB Application: runPlugins: end: canSelectRows
Zeit: 37.25 ms / 6244.81 ms Speicher: 0.004 MB / 19.96 MB Application: runPlugins: start: onCanDelete
Zeit: 0.07 ms / 6244.88 ms Speicher: 0.002 MB / 19.96 MB Application: runPlugins: end: onCanDelete
for every row (really 10 debug entries for every row; at least I have 34 rows and 10x34 this package)

@cheesegrits : why 2. and 3.?

Additionally: https://github.com/Fabrik/fabrik/issues/1771

So @samani :
make sure you have only elements enabled which are needed
make sure they don't have 'link to details' enabled or a 'custom link' set
make sure your googlemap element has 'Use static map' = no in 'List settings' tab
 
Yeah, the ACL checks can be expensive, as we have to run them regardless of the static ACLs, in case a canEditRow or canDeleteRow plugin has a different opinion. And because those plugins can base their decisions on individual row data, they have to be called (several times) for every row. And even if there isn't any acl plugins on the list, we still have to go through the runPlugin() method, and test to see if there are any. And we can't cache the results per element, because of the per-row thing.

Re "it doesn't matter if element is set to show in list data, all elements are rendered"

I don't seem to be able to replicate this. If I remove an element from list view, it doesn't get rendered in either list view or the map. And I've stepped through the code, and can't see any circumstances in which that would be different, unless the element is set to "Always render".

Anyway, the safest approach is going to be to simply unpublish all but the elements you actually need on the copy you use for the map (remember not to unpublish the id!).

-- hugh
 
Btw, that "start: canEdit" time on the profile is a little misleading. The times in profiles are based on time elapsed since the last profile event. So basically the "start: canEdit" during list element rendering is the time taken to do the entire rendering for the element for that row. So turning off 'link to details' isn't going to save you much - basically just the .2ms (or whatever) between start and end:canEdit.

I've added some profiling, so that every element records start of list rendering, and the parent records start/end. Everyt element has it's own specific renderListData() method, and then calls the parent element model's renderListData() (to do common stuff like adding links, row classes, etc), and that itself calls renderListDataFinal(), which does the actual layout rendering.

The improved profiling should help identify where time is going.

-- hugh
 
Re "it doesn't matter if element is set to show in list data, all elements are rendered"
I don't seem to be able to replicate this.
All my elements are set to show in list = no

Map debug is showing (without the new profiling)
upload_2017-6-23_0-39-12.png

whereas list debug shows only the dbjoin render
upload_2017-6-23_0-41-25.png

In both cases every row CanDelete takes about 35 - 40 ms although the ACL is nobody, no list plugin, no form plugin
 
Weird, I absolutely can't replicate that. If I remove an element from list view, I don't see any rendering profiles for it.

-- hugh
 
Did you set "include in list query"=no (additionally to show in list =no)?

In this case it's not rendered in the map.
But with the default settings "include in list query"=yes, "always render"= no and "show in list"=no it's rendered in the map viz but not in the list view.

No problem to set the elements as you need if you do the workaround with an additional list for the map.
But if you have the same list...

BTW: the dbjoin in my list view^^ was rendered only because of "Always render" was set to yes.
 
I found this in plugins\fabrik_visualization\googlemap\models\googlemap.php
* One day we should get smarter about how we decide which elements to render
* but for now all we can do is set formatAll(), in case they use an element
* which isn't set for list display, which then wouldn't get rendered unless we do this.
if (FabrikString::usesElementPlaceholders($template))
{
$listModel->formatAll(true);
}
So as soon as the bubble template has a placeholer, all elements are rendered. I assume this was before the element option "always render" was added.
If I take this line out it doesn't show any element rendering in the debug (as expected).

I had expected to see only the raw values in the marker popup but it's showing the labels of the dbjoin (nice effect but :confused: )
But date elements or elements with "link to details" are showing up raw (until set to "Always render").
-----------
Edit:
So it will break backward compatibility taking the formatAll out (elements in bubble template must be set to always render if not shown in the list) but speed up the map viz dramatically.
-----------------------
The map is speeding up (34 rows, 7 elements) to about 2 seconds (from 8 seconds with formatAll)

You can work around these element renderings with the list copy, but in this case the map viz doesn't show filtered values (if the list view was filtered before).


If the map could skip all these row onCanDelete it would save additional rownumber x 35ms (i.e. about 1 second per 30 rows).
(onCanEdit and canSelectRows are fast, but why are those tests necessary in a viz?)
 
Last edited:
Ah hah, OK, yes, that explains it. And yes, we can remove that, as it was done before "always render" was added.

Yes, things like join labels will show without rendering, as that data comes from the query. Formatting is all the other layout stuff that happens, above and beyond query results (like building images from uploads, or static map displays from map cords, etc).

I'll look at the onCanDelete stuff.

Sent from my HTC6545LVW using Tapatalk
 
So @samani :
make sure you have only elements enabled which are needed
make sure they don't have 'link to details' enabled or a 'custom link' set
make sure your googlemap element has 'Use static map' = no in 'List settings' tab
i do all this.
thank's staffs but what do i do for increase my page speed?
i disable any not needed element.
disable link and any other...
I'll look at the onCanDelete stuff.
i think i must wait to hugh repair some code and then update my code from github. right?

another thing is: according your advise, now i copy the list and for trashing one of element of the copied list all the table for that element (e. g. image element ) is drop form database.how can i trashed element instead of disable it?
 
Trash:
If you are trashing an element it's only in the trash, nothing happens at all.
In trash if you select the trashed element and click "Empty trash" you are asked "
Select elements where you want to drop (delete) the associated database column"
The column is only removed if you select the element again before clicking "Save".
If you want to keep the column (you have to, if there are more lists/elements linked to this database table) don't select the element, just click "Save"
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top