From 2d93554a5af79c591dc20880e7f08605154f0a7b Mon Sep 17 00:00:00 2001 From: Nick Aguilar Date: Fri, 26 Sep 2025 08:56:00 -0700 Subject: [PATCH 1/2] Documents performance limits on liquid functions --- src/connections/destinations/actions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/connections/destinations/actions.md b/src/connections/destinations/actions.md index bee1f32fcc..9f6a6c051a 100644 --- a/src/connections/destinations/actions.md +++ b/src/connections/destinations/actions.md @@ -390,6 +390,12 @@ Explanation: * The `prepend: "+"` filter adds the `+` prefix. * The `default` filter outputs an empty string if the phone number is missing. +#### Template Limitations +The following limitations are in place for security and performance reasons: +* Templates are limited to 1000 characters per function. +* Template evaluation is limited to 500 ms. +* Template memory usage is limited to 100MB. + ## Conditions > info "" From a717306f7868459f79ea5afaf6788a649f8ae96b Mon Sep 17 00:00:00 2001 From: pwseg <86626706+pwseg@users.noreply.github.com> Date: Fri, 26 Sep 2025 11:21:05 -0700 Subject: [PATCH 2/2] minor rewording + moving this section up --- src/connections/destinations/actions.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/connections/destinations/actions.md b/src/connections/destinations/actions.md index 9f6a6c051a..1e9e3fceac 100644 --- a/src/connections/destinations/actions.md +++ b/src/connections/destinations/actions.md @@ -245,6 +245,14 @@ The Liquid syntax function enables you to transform event data with fine-grain c #### Whitespace By default, Liquid will generate a newline when inputing multi-line templates. To strip these newlines you can use hyphens in the syntax (`{{-`, `-}}`, `{%-`, `-%}`). See the [LiquidJS docs](https://liquidjs.com/tutorials/whitespace-control.html) for more information. +#### Liquid template limits + +Segment enforces the following limits on liquid templates to protect performance and security: + +- Maximum template length: 1,000 characters per function +- Maximum evaluation time: 500 ms +- Maximum memory usage: 100 MB + #### Supported liquid tags and filters Segment supports the following LiquidJS tags and filters for mappings. Segment selected these to ensure performance, security, and compatibility with real-time event processing. Segment disabled unsupported tags and filters to prevent performance degradation or security risks. @@ -390,12 +398,6 @@ Explanation: * The `prepend: "+"` filter adds the `+` prefix. * The `default` filter outputs an empty string if the phone number is missing. -#### Template Limitations -The following limitations are in place for security and performance reasons: -* Templates are limited to 1000 characters per function. -* Template evaluation is limited to 500 ms. -* Template memory usage is limited to 100MB. - ## Conditions > info ""