Skip to content

Commit 50b78ba

Browse files
committed
refactor: clean up
1 parent 2f7561c commit 50b78ba

File tree

1 file changed

+8
-0
lines changed
  • sources/platform/actors/development/actor_definition/dynamic_actor_memory

1 file changed

+8
-0
lines changed

sources/platform/actors/development/actor_definition/dynamic_actor_memory/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ This helps:
2626
- _Reduce costs_ for small runs (less memory when it’s not needed).
2727
- _Provide better user experience_, so users get optimal performance without having to manually configure memory.
2828

29+
For example, the developer of an Actor could define an expression like:
30+
31+
```js
32+
min(get(input, 'startUrls.length', 1) * 64, 4096)
33+
```
34+
35+
This expression calculates memory based on the number of URLs provided by the user, making sure that for large inputs the Actor doesn’t exceed 4 GB.
36+
2937
:::info Dynamic memory is not runtime auto-scaling.
3038

3139
_This feature does not change memory while the Actor is running._

0 commit comments

Comments
 (0)