xbee network is slow in coordinator,router,end device communication

Hello,
I am doing a home automation system,in it using a xbee s2 network including xbee API Coordinator,API router and AT end device.The end device is connected with some sensors and lights and router is connected with avr32 micro controller, and the coordinator is connected with my PC.The out put of sensors are send from end device to router and in process it in micro controller and send its response from router to end device back… Also the coordinator give some instructions to the router and the micro controller process it and send frames to controls the lights connected with end device… all the datas are send as frame format… My problem is that the network is too slow and hang it some time.On first time i was used the network as API coordinator(with avr controller) and AT router(with sensors and lights),in that moment the system work so fast, but after i change the network as API coordinator(with PC),API router(with AVR controller) and AT End device(with lights and sensors) the system is so slow and hang always… how can i fix this problem…I hope all your helps as early as possible…Thank you…

What do you mean by SLOW?
Are you using the latest XCTU application to check radio quality and especially the Frames log to see exactly when frames are received and transmitted?
What is your sampling rate set to on the routers and end devices?
I’m still learning all this myself, but why have you got the routers set to API?