Hello,
Welcome to Visual WebGui!
Please try working with making the changes in server-side only. We have a very efficient platform using AJAX and many other performance enhancing features. If when benchmarking the application when using server-side code is much slower than you are willing to accept, that I guess you can try using client-side JS code.
Please remember that server-side state will not be updated with these changes made to the client through JS unless you create VWG events to notifiy the server of all these changes. If an event will not be create for every change, when refreshing the page or firing a critical event, all changes will be reverted and will also be completely unnoticed in server-side.
I noticed that you didn't change the javascript file's name to the name of the custom TreeView derivative. Please look at section 3 of my last post for further clarifications.
You can use that post as a reference, though at first read you shouldn't skip any part of that document.
Regards,
Ori Cohen
Manager of support, the Visual WebGui team