Adi – 19-33 Aug 5

I had one doubt based on performance. I am loading shadow DOM component and then making API call to get CSS colors, position and other configuration. And then querying DOM again to update shadow DOM component with required color and position (i.e top-left, right, bottom) etc. This shadow DOM component is nothing but web widget. Do you think making API call and then re-rendering component will degrade the performance?
UU
Unknown User620d ago
A
Adi620d ago
I am trying to build widget which loads on any website but I want to have customization for widget. That customization is done by user on dashboard page. Customization includes widget color, button color, button text, background color and position. This data is fetched and DOM is updated again. Is there any better way to do this stuff? any suggestions?
UU
Unknown User620d ago
A
Adi620d ago
what should be ideal response time of API call via which I am getting config info
UU
Unknown User620d ago
A
Adi620d ago
😅 for first time call it takes 200-300ms but latter it is very fast less than 100ms may be because of caching. I am using $5 droplet server node/express server. Do you think putting that endpoint behind cloudflare CDN worker/functions would be helpful for improving performance? or do you think it is premature optimization?
UU
Unknown User620d ago