Thanks for the question! The best way would be to set the data at the time of initialization, but it also depends on your use case. Where do you get your data from? Is it available at the time of initialization?
Can you give me some info on why do you want to set the date before the select opens? I would like to get an idea on what you want to achieve.
Thanks @Junyoung for the details!
In this case you will only need the refresh call. The option call is not needed. You can pass the data as the first parameter to the refresh like this:
onBeforeShow: function (event, inst) {
var data = [{ text: 1, value: 1 }, { text: 2, value: 2 }];
inst.refresh(data);
}