Skip to content

Commit 82e1441

Browse files
committed
docs(rendering): correct limit count and streaming chunk behavior
- Add streaming error handling section linking the central handler - Fix each-block comment to state one chunk per block flush - Reword intro from two limits to a set of limits - Translate stray streaming comment to Indonesian
1 parent 4471e11 commit 82e1441

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

docs/id/rendering/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Karakteristik performa dan perilaku caching mesin template Deserve
44

55
# Performa dan Batas
66

7-
Mesin DVE meng-cache template terkompilasi dan mengawal rendering dengan dua batas, jadi halaman besar tetap cepat dan template yang tak terkendali gagal dengan jelas alih-alih menggantung server.
7+
Mesin DVE meng-cache template terkompilasi dan mengawal rendering dengan beberapa batas, jadi halaman besar tetap cepat dan template yang tak terkendali gagal dengan jelas alih-alih menggantung server.
88

99
## Caching
1010

docs/id/rendering/streaming.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ Semua fitur DVE dari [Sintaks Template](/id/rendering/syntax) bekerja dengan str
8484
<body>
8585
<header>{{header}}</header>
8686

87-
<!-- Each loop streams item by item -->
87+
<!-- Blok each dikirim sebagai satu chunk -->
8888
{{#each items as item}}
8989
<div class="item">
9090
<h3>{{item.name}}</h3>
9191
<p>{{item.description}}</p>
9292
</div>
9393
{{/each}}
9494

95-
<!-- Conditional rendering -->
95+
<!-- Rendering kondisional -->
9696
{{#if showFooter}}
9797
<footer>{{footer}}</footer>
9898
{{/if}}
@@ -152,6 +152,10 @@ export async function GET(ctx: Context): Promise<Response> {
152152
}
153153
```
154154

155+
## Penanganan Error
156+
157+
Streaming punya dua jendela kegagalan. Template yang hilang atau error kompilasi terlempar sebelum response mulai, jadi hal itu mencapai [error handler terpusat](/id/error-handling/object-details) seperti render biasa dan membentuk balasan status yang normal. Kegagalan saat memproduksi chunk terjadi setelah header sudah terkirim, jadi response tidak bisa berubah lagi. Kegagalan itu muncul sebagai event [`view:error`](/id/middleware/observability/events#view) di [bus observability](/id/middleware/observability/overview) dan stream ditutup, itulah kenapa validasi berat sebaiknya dilakukan sebelum stream, bukan di dalamnya.
158+
155159
## Migrasi dari Render Biasa
156160

157161
```typescript

docs/rendering/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Performance characteristics and caching behavior of the Deserve te
44

55
# Performance and Limits
66

7-
The DVE engine caches compiled templates and guards rendering with two limits, so large pages stay fast and a runaway template fails loudly instead of hanging the server.
7+
The DVE engine caches compiled templates and guards rendering with a set of limits, so large pages stay fast and a runaway template fails loudly instead of hanging the server.
88

99
## Caching
1010

docs/rendering/streaming.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ All DVE features from [Template Syntax](/rendering/syntax) work with streaming:
8484
<body>
8585
<header>{{header}}</header>
8686

87-
<!-- Each loop streams item by item -->
87+
<!-- Each block flushes as one chunk -->
8888
{{#each items as item}}
8989
<div class="item">
9090
<h3>{{item.name}}</h3>
@@ -152,6 +152,10 @@ export async function GET(ctx: Context): Promise<Response> {
152152
}
153153
```
154154

155+
## Error Handling
156+
157+
Streaming has two failure windows. A missing template or a compile error throws before the response starts, so it reaches the [centralized error handler](/error-handling/object-details) like a regular render and shapes a normal status reply. A fault while producing chunks happens after the headers are already sent, so the response cannot change. That fault surfaces as a [`view:error`](/middleware/observability/events#views) event on the [observability bus](/middleware/observability/overview) and the stream closes, which is why heavy validation belongs before the stream rather than inside it.
158+
155159
## Migration from Regular Render
156160

157161
```typescript

0 commit comments

Comments
 (0)