---
title: "Ilya (@Snowmaze) | Hashnode"
description: "Ilya (@Snowmaze) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@Snowmaze"
---

@Snowmaze

# Ilya

@Snowmaze · Joined July 2025

## Comments

[Why wouldn't you just use subList? db.chatDao().insertChats(list.subList(0, 45)) if (list.size > 45) list.subList(45, list.size).chunked(150).forEach { db.chatDao().insertChats(it) }](https://hashnode.com/posts/leveraging-fold-operator-in-kotlin-flow-to-optimize-room-db-upserts/655c44afe10e32209234a4f1/comment/686eae2a3c049ed70a8ca99d)

Comment · Article · Jul 9, 2025 · [Leveraging fold operator in Kotlin flow to optimize Room DB upserts](https://hashnode.com/posts/leveraging-fold-operator-in-kotlin-flow-to-optimize-room-db-upserts/655c44afe10e32209234a4f1)
