Getting data for the widget

What is the best way to do that is with minimal load.?

This method is not quite suitable.