On the advantage of js inertia singleton

see the lazy singleton, saying that it is used to delay the generation of objects, however,
1. What specific scenes did he use it in?
2. What are the benefits of delaying the generation of objects?
also ask friends to give us some advice

Mar.02,2021

can save system resources, and singleton mode can undoubtedly improve system performance for objects that need to be created and destroyed frequently.
is similar to lazy loading


for some objects that need to be initialized for a long time, it can greatly improve the performance of the system
such as node's mysql initialization instance, if the data is initialized every time it is read and written, it is really too slow ~

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b368a9-2c016.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b368a9-2c016.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?