Get online users only

i have use openfire+iJab .i have to add 1800 user to one group . it’s very slow to load the mainwindow by javascript.so i decided to show only online users,so i think modify the openfire source code.how to modify openfire source code or any details about load 1800 members . pls give me any idea for increase the speed of the mainwindow for chatting