This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

leocavalcante
leocavalcante

Hi guys, I'm using October for a long now, exceptional tool, saves me a lot of time. After 3 simple sites built with it, I decided to use for a more complex system. Went well, it's working fine, just missed something out of the box for the API, but its very nice.

Going to the point: as most of systems, what I've built needs a Dashboard reporting what is going with the records, was ok to work with ReportWidgets, have about 10 now where the user is very satisfied, he can move around and edit some properties, the problem is about dashboard's performance, it's very slow, noticed that every ReportWidget will fetch Database on its own, there are cases where if we put all widgets on the dashboard it doesn't load.

My experience with dashboards on another frameworks was to load raw data once, put into memory then let widgets manage them as they like without refetching the database. How can I archive something like that in October? There is already something to work properly with dashboards or I need to do some caching etc by my own? Have anyone built complex dashboards with October?

Thanks!

Renatio
Renatio

Hi,

did you actually check how much time those database queries last and memory consumption?

Install this plugin: https://octobercms.com/plugin/bedard-debugbar

and paste us "Queries" Tab output.

You can cache db queries like that:

$value = Cache::remember('users', $minutes, function() {
    return DB::table('users')->get();
});

Last updated

leocavalcante
leocavalcante

Hello @Renatio, thanks for the hints, I already know how to profile database and how to Cache, my doubt is if there is some proper/best practice way to deal with dashboards in October, if widgets does the fetching by its on, if I should work with data stored somewhere, like cache etc... Get people experience with dashboards on their October apps.

Have you done some more complex with October? What can you share?

Cheers!

Renatio
Renatio

Hi,

I still don't understand what is your problem. You create new report widget and you are resposible to fetch data for it. So you are resposible to write optimized query to database. If your report widget data is not changing to much you should use cache to optimize it even further. Every time site is refreshed or you change properties for widget it will reload data.

I have couple report widgets in my project and every query to database takes about 1ms. So even when you have 50 report widgets (what is insane : ) ) you should not exceed 100ms.

leocavalcante
leocavalcante

Thanks @Renatio I was just searching for other people knowledge on this matter inside October development, for now will just develop dashboards as in any other app, as far as I can see there is no recommendation/best practice on the community yet. Anyway, thanks for sharing your experience.

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.