I have an LWC page with three section getting data from 3 apex methods all are returning a list of wrapper class, my requirement is lesser initial load time of the page, to fetch data from apex I have two approaches in my mind.
- Use 3 wire methods to fetch data from 3 apex methods.
- Create one common method in apex to call other methods and return only one object of wrapper class with 3 list type properties of other wrapper classes and use only one wire method in JS to call data from apex
if I use first approach then all wire methods fetch data in three apex contexts and in 2nd approach it will fetch data only in one apex context.
In my case I am sure I won't hit the governor limit if I use 2nd approach but is there any other things to consider and also which approach will take more time to load?