Adi
Adiβ€’2y ago

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?
7 Replies
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Adi
Adiβ€’2y 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?
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Adi
Adiβ€’2y ago
what should be ideal response time of API call via which I am getting config info
Unknown User
Unknown Userβ€’2y ago
Message Not Public
Sign In & Join Server To View
Adi
Adiβ€’2y 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?
reactibot
reactibotβ€’2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1005196932332916807