找回密码
 立即注册
查看: 224|回复: 0

Notice the cyan segments are

[复制链接]

1

主题

0

回帖

5

积分

新手上路

积分
5
发表于 2023-12-24 17:35:49 | 显示全部楼层 |阅读模式
Using a database that is not too close to your function in the same region will directly increase the duration of the cold start but will also incur the same cost when executing queries later during hot requests. Optimizing Internal Architecture Building In the diagram shown earlier you may have noticed that only two of the three sections on the Internal column are directly related to the database. Another partial pattern generator shown in cyan is not. This shows us that this segment is an area for improvement. The database is located in the same area as the function. The segment of the green bar represents the time it takes to run its function to establish a connection with the database. The segment is divided into two blocks in the inner column, cyan and light red. The light red segment represents the time spent actually.

Creating the database connection and the cyan segment shows the time spent by the query engine reading your schema and then using it to generate the schema used to validate inc photo editing servies oming client queries. The way these projects were generated previously was not as optimized as it should be. To shorten this section we addressed the performance issues found there. More specifically we found a way to remove an expensive piece of code that converts the internal schema when starting the query engine before building the query schema. We also now lazily generate strings for many type names in query patterns. This made a significant difference. In addition to this change we also found ways to optimize the code in the architecture generator to improve memory layout resulting in a significant performance runtime improvement.




NOTE If you are interested in the specific details of the memory allocation related fixes we made please take a look at the following example pull request. The previous request after applying these changes is shown below with Schema Builder enhancements.  significantly shortened. This is a huge win but there are still cyan segments out there which means time is spent doing things that have nothing to do with the database. We've identified potential enhancements that will bring the segment close to, if not completely down to, zero. Various Small Victories Along the way we also discovered many smaller inefficiencies that we were able to improve. There are many of them so we won't cover them all but a good example is the optimization we made to the platform detection routine for searching libraries in the environment. A pull request for this enhancement can be found here. This enhancement reduces cold start time by approximately .

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|阳朔网

GMT+8, 2024-11-28 19:26 , Processed in 0.033291 second(s), 18 queries .

Powered by Discuz! X3.5

Copyright © 2001-2023 Tencent Cloud.

快速回复 返回顶部 返回列表