I have a plugin that performs some searches and re...
# suitescript
m
I have a plugin that performs some searches and returns a number, I would like to wrap that call to the plugin inside a promise to improve performance in a client script
b
Wrapping synchronous code inside a Promise does not make it faster
m
no but it should free up the rest of the client script to continue while that slow function is being executed, no?
b
It wont
It cant continue, you will just make a Promise that resolves immedietly
m
so the only way to get what I am trying to achieve is to rewrite the whole function to do the searches using promises?
b
Yes