mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-05-03 07:22:27 +00:00
bc78f60e32
If we want to minimize allocations for every invocation, we need to look at types that currently allocate. Currently we use a String to hold the request id. However since the request id is a uuid, that string is 36 characters long. This is way above the 15 character string allocation threshold. The go to type in this case would be `UUID`. However `UUID` is in Foundation and we want to keep the lambda runtime Foundation free. This pr introduces a LambdaRequestID to represent a uuid. One nice side effect of having our own uuid case is: We can make writing the uuid-string to a ByteBuffer allocation free (since no intermediate translation to a string is needed first).
45 lines
1.6 KiB
Plaintext
45 lines
1.6 KiB
Plaintext
|
|
The SwiftAWSLambdaRuntime Project
|
|
=================================
|
|
|
|
Please visit the SwiftAWSLambdaRuntime web site for more information:
|
|
|
|
* https://github.com/swift-server/swift-aws-lambda-runtime
|
|
|
|
Copyright 2017-2021 The SwiftAWSLambdaRuntime Project
|
|
|
|
The SwiftAWSLambdaRuntime Project licenses this file to you under the Apache License,
|
|
version 2.0 (the "License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at:
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
License for the specific language governing permissions and limitations
|
|
under the License.
|
|
|
|
Also, please refer to each LICENSE.txt file, which is located in
|
|
the 'license' directory of the distribution file, for the license terms of the
|
|
components that this product depends on.
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
This product contains a derivation various scripts from SwiftNIO.
|
|
|
|
* LICENSE (Apache License 2.0):
|
|
* https://www.apache.org/licenses/LICENSE-2.0
|
|
* HOMEPAGE:
|
|
* https://github.com/apple/swift-nio
|
|
|
|
---
|
|
|
|
This product contains a derivation of the swift-extras' 'swift-extras-uuid'.
|
|
|
|
* LICENSE (MIT):
|
|
* https://github.com/swift-extras/swift-extras-uuid/blob/main/LICENSE
|
|
* HOMEPAGE:
|
|
* https://github.com/swift-extras/swift-extras-uuid
|