Renset / macai

Swift powered native macOS client for Ollama, ChatGPT and compatible API-backends
https://renset.gumroad.com/l/macai
MIT License
99 stars 10 forks source link

Feature: Add pagination #8

Closed pradeepb28 closed 1 year ago

pradeepb28 commented 1 year ago

It would be great if the chat is loaded from core data using pagination, this helps ensure long chats are loaded in reasonable time.

Renset commented 1 year ago

@pradeepb28 pagination is an interesting idea - but probably we can improve performance using another method. Do you have any specific conditions when you experience slow chat loading? Maybe there are many code blocks, or something else? AFAIK, library Highlightr, used for code highlighting is kinda slow as it uses Highlighter.js under the hood

pradeepb28 commented 1 year ago

when users have 2-3 chats it is fine no need of pagination but when users have 10 chats and each chat has more than 50 messages, it will be noticeably slow.

Also by the way, apps with feeds or chat kinda use-cases uses pagination by default as a good practice :)

Renset commented 1 year ago

I'm not sure the pagination is a good practice for desktop apps, at least for most cases, but just in case may you provide some examples? And what pagination did you mean, pagination for messages or pagination for chats?

Renset commented 1 year ago

I am closing this ticket for now, but this issue can be re-opened once the example is provided