Hello Jakob, Thank you for your response. I will make sure to design my application accordingly.
My next question would be, does v8 optimize according to new prototype changes after a while? Or should I restart the application in certain periods to make sure the application is optimized with newly added functions? My next question is, do all functions have to be in a file in order to optimization to not be broken? Because my idea was to keep all functions in a database and then add them to prototypes whenever application's restarted. On 3/2/18, Jakob Kummerow <jkumme...@chromium.org> wrote: > Functions created with eval or new Function will get optimized (after a > while, just like other functions -- nothing is optimized on first use). > > That said, modifying prototypes after the fact tends to have a performance > impact, because V8 makes optimizations (all over the place) based on the > assumption that prototypes don't change much. When they do, optimized code > built on such assumptions must be discarded. That may or may not be an > issue for your use case, the only way to find out is to try. > > > > On Fri, Mar 2, 2018 at 7:47 AM Koray <burakko...@gmail.com> wrote: > >> Forwarding here from Node.js group as this one is more appropriate. >> >> Hello, >> >> I have a real time application which will require constant updates / >> bug fixes. So I will be constantly defining new functions on >> prototypes or constructors. >> >> My question is, will there be a difference between functions which >> were hard coded and functions defined using eval or Function >> constructor? If so, will require() be possibly able to get around >> this? >> >> Note: Functions will be used multiple times throughout the lifetime of >> the application. Giving this information just in case if they are >> being optimized after the first usage. >> Thank you >> >> -- >> -- >> v8-users mailing list >> v8-users@googlegroups.com >> http://groups.google.com/group/v8-users >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to v8-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.