Comments (1)
Can we do a faster stringify?
There are options like fast-json-stringify which relies on json schema to be defined for the payload. This would work well with Loopback as response schemas should exist for all apis.
I doubt this will help in your case though because it does not improve the performance a lot for large payloads. JSON is just a extremely inefficient serialization format, especially for large payloads.
or maybe make this asynchronous?
There is no cheap way to make JSON serialization async, could run the serialziation in a worker thread but I would assume passing the object and then the serialized json through worker boundaries is quite expensive as well.
I haven't used this library myself, but streaming the serialization via JSONStream might help, likely takes more overall time but you have run the chunks in different iterations of the event loop which will give your app time to respond to other requests.
what happens is that during this time all other requests goes pending in my case liveliness check goes pending and as per my configuration if liveliness failed the container restarts .
how to fix this problem ?
Could just run the server hosting the liveness api in a different thread. That way it would still be able to respond even if main thread is busy.
from loopback-next.
Related Issues (20)
- [@loopback/sequelize] Typescript error when using the "required" property with Sequelize HOT 2
- Polymorphic relations broke SQL Transactions HOT 5
- Error when running `npm run tsdocs`
- @loopback/repository 6.1.4 broke hasManyThrough relations HOT 4
- [@loopback/sequelize] contains & match (extendedOperators) are not working HOT 1
- [@loopback/sequelize] SQL select error if an empty string "order" is passed to SequelizeRepository find / findOne methods
- Options param in SequelizeRepository create methods issue HOT 2
- ESLint: naming convention errors on certain third-party imports
- @loopback/sequelize:modify the regular expression to match a select query with parentheses
- Dockerfile improvements HOT 3
- [BOOT] Not possible to import ESM project files HOT 2
- [@loopback/sequelize] Unable to order by associations using "order" filter
- [@loopback/sequelize] syncSequelizeModel error for models having property type array & item-type object HOT 3
- lb4 controller fails with type BASIC HOT 2
- [@loopback/sequelize] Hidden properties configuration is not applied to nested model relations
- [bug] getting "HTTP/1.1 501 Not Implemented" HOT 4
- LoopBack 4 EOL mismatch HOT 1
- Repository-CLI-Generator documentation mention incorrect directory for base repositories HOT 1
- Performance issues with lb4 services HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-next.