# Get Chat History

**URL:** <https://forum.heroiclabs.com/t/get-chat-history/3231>\
**Category:** Client Libraries\
**Tags:** sdk-unity\
**Created:** [November 3, 2022, 4:17pm UTC](https://forum.heroiclabs.com/t/get-chat-history/3231 "2022-11-03T16:17:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheNeSSePa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/thenessepa/32/1294_2.png) [@TheNeSSePa](https://forum.heroiclabs.com/u/TheNeSSePa)\
**Post date:** [November 3, 2022, 4:17pm UTC](https://forum.heroiclabs.com/t/get-chat-history/3231/1 "2022-11-03T16:17:28Z")

</div>

hi  
i am using unity 2021 and i want to get my channel history but  
it uses main thread and freeze my game if i get 100 messages

---

<div class="post-metadata">

**Author:** ![lugehorsam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/lugehorsam/32/314_2.png) [@lugehorsam](https://forum.heroiclabs.com/u/lugehorsam)\
**Post date:** [November 3, 2022, 6:32pm UTC](https://forum.heroiclabs.com/t/get-chat-history/3231/2 "2022-11-03T18:32:56Z")

</div>

Hey @TheNeSSePa I recommend using Unity’s built-in profiler and looking at what the CPU is spending time on. In theory there is nothing about 100 messages that should freeze your game. You are welcome to run Nakama in a multiple threads if you’d like but be aware that you would need to pass messages back and forth into the Unity main thread.

---

<div class="post-metadata">

**Author:** ![TheNeSSePa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/thenessepa/32/1294_2.png) [@TheNeSSePa](https://forum.heroiclabs.com/u/TheNeSSePa)\
**Post date:** [November 6, 2022, 1:49pm UTC](https://forum.heroiclabs.com/t/get-chat-history/3231/3 "2022-11-06T13:49:40Z")

</div>

i debuged it  
and seems that when i call client.getchannelhistory main will freeze  
and i try it to call it from another thread but  
i got a error (its only can call from main thread)

---

<div class="post-metadata">

**Author:** ![lugehorsam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/lugehorsam/32/314_2.png) [@lugehorsam](https://forum.heroiclabs.com/u/lugehorsam)\
**Post date:** [November 7, 2022, 3:41pm UTC](https://forum.heroiclabs.com/t/get-chat-history/3231/4 "2022-11-07T15:41:55Z")

</div>

Hey @TheNeSSePa I recommend being even more detailed in your profiling. If you enable a detailed view in the profiler the stack trace in the highest CPU time sections should reveal more information.

---

<div class="post-metadata">

**Author:** ![TheNeSSePa](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/thenessepa/32/1294_2.png) [@TheNeSSePa](https://forum.heroiclabs.com/u/TheNeSSePa)\
**Post date:** [January 3, 2023, 5:03pm UTC](https://forum.heroiclabs.com/t/get-chat-history/3231/5 "2023-01-03T17:03:15Z")

</div>

you was right  
its ok now its about my spawning objects tnks
