Hide from index
Hey, is it possible to hide the chart from the index of a resource? I have over thousand items in my resource model and the performance is very slow now
Thank you!
Hi,
That's a nice suggestion. You can hide it from Index by adding ->hideFromIndex() if you are using NovaChartjs::make syntax, but right now there is no easy way to achieve this with InlinePanel. I will try to add this option to our next update.
Once again thanks a lot for pointing that out.
Thank you, that works! But the loading time doesn't improve from hiding the chart from index. It seems that the process for generating the charts is runnig even though it's hidden
@seoanalyze That is somewhat odd.. I tried the same thing at my end and it is not calling the Field's resolve method if it is hidden from Index. Infact even with adding it to Index the loadtimes are quite fast at my end.
Can you please check you dev tools to ascertain that whether removing NovaChartjs from resource is decreasing the load time?
BTW, our update with 'hideFromIndex' for Panel in almost ready. I will update this ticket once it is added to main branch
Thank you for your quick answer and I'm really looking forward to the new release :)
When I remove the NovaChartjs my loading time is much faster. I uploaded some screenshots:
With NovaChartjs: https://www.wordpress-cologne.de/with.png
Without: https://www.wordpress-cologne.de/without.png
And my fields function inside my resource: https://www.wordpress-cologne.de/fields.png
Hi, I have the same problem. Without NovaChartjs the loading time is 14 seconds and with it is 1,3 minutes. There are 4000 records in nova_chartjs_metric_values table.
@mariuscirstea Even with 4000 records it should not take so long. I can understand a couple of seconds delay like @seoanalyze is facing, but this seems odd. I have tested with around 500 records without such issues. I will try to test with more records as well.
Can you please send me a screenshot like the ones send by seoanalyze (Specifically if there is any particular request which is taking a lot of time)
@mariuscirstea Is this delay with or without removing Metric Values from Index? Also, are you facing a similar delay or detail page?
If you are displaying a lot of records together on Index, one possibility can be that Chartjs might be using a lot of resources to create charts for each record.
Typically for many records are there is each row?
This is my nova fields method:

When I removed NovaChartjs::make()

This is with NovaChartjs::make()

The new version works like a charm. The speed is awesome and everything is like expected. Thank you so much! :)
@seoanalyze Thanks for your valuable feedback. I have one for update in works which will further reduce query counts to absolute minimum I can achieve.
BTW, Yesterday we have the public release of our new package https://github.com/kirschbaum-development/nova-inline-relationship
If you are interested in Nova this might be really useful for you.
Regards.
I've already saw the inline-relationship package. Absolutely awesome. Keep up your great work to make Nova much better :)