tdesktop icon indicating copy to clipboard operation
tdesktop copied to clipboard

[bug] Slowed to 7 seconds editing contacts and all actions: load, sub menu emotions open story, at big contacts accout

Open reportingtg opened this issue 1 month ago • 5 comments

Steps to reproduce

Account with 5k+ dialogs, 3k~20k added contacts, 1k channels 50+ emotion packs, 50+ sticker packs

From jan 2025:

  1. loading telegram from 10 to 40 seconds
  2. all actions have feeling or visual delay 0.15+s

From ~feb 2025:

  1. pressing additional sub menu emotions in stories - delay 6s each time same
  2. open any story 6s delay

From september 2025:

  1. pressing edit any contact - delay 6s each time same

###First try fix: Fresh login at new disk and new folder, or deleting huge files in \tdata\D877F78*" and set cache to 200mb max

Result: give instant all ations for first 2 minutes only

second time opening telegram new files appear: (lke A1A2AAAA9A9s) 3,09mb 5,64mb 9mb

basic all account have big files in folder \tdata\D877F78*: 3,36mb 3,03 mb

###Second try after some hours:

  1. biggest files no more creating only this addtional: 3,09mb

all action are speed, but slower then instant on fresh login editing contacts have ~0.2s delay view story 1.1s delay

opening any way emotions or stickers have 15 seconds+freeze telegram and "bug 6 seconds" delay back to all

  1. change cache to 1gb, 3 time use and start telegram: Result: all stay same

Expected behaviour

all action instant (flash)

Actual behaviour

"A Lot" "contacts/sticker/emotions" account work with delay, any cache size

Other "small" "contact/sticker/no emotions" account (500 channels) work faster without fresh login

Operating system

windows 10

Version of Telegram Desktop

lastest 6.3

Installation source

Static binary from official website

Crash ID

No response

Logs


reportingtg avatar Nov 15 '25 22:11 reportingtg

Do you have HDD or SSD?

john-preston avatar Nov 17 '25 08:11 john-preston

The big files are serialized metadata about server-provided featured sticker sets and custom emoji sets. I've added some entries in debug logs (you can enable them in Settings by typgin "debugmode") to check if reading and parsing them gives any delays on app launch, although I doubt this is the case, reading of such data amounts should be fast. For me for 4 accounts it gives such values (3 seconds) even in debug build (which is extremely slow compared to release build):

[12:53:27.317 00-0001217] Init: Read installed sticker sets. (storage_account.cpp : 25)
[12:53:27.413 00-0001222] Init: Read installed masks. (storage_account.cpp : 25)
[12:53:27.413 00-0001223] Init: Read installed emoji sets. (storage_account.cpp : 25)
[12:53:27.520 00-0001235] Init: Read featured sticker sets. (storage_account.cpp : 25)
[12:53:27.998 00-0001281] Init: Read featured emoji sets. (storage_account.cpp : 25)
[12:53:28.497 00-0001282] Init: Read recent stickers. (storage_account.cpp : 25)
[12:53:28.498 00-0001283] Init: Read recent masks. (storage_account.cpp : 25)
[12:53:28.498 00-0001284] Init: Read faved masks. (storage_account.cpp : 25)
[12:53:28.498 00-0001285] Init: Read saved GIFs. (storage_account.cpp : 25)
[12:53:29.188 00-0001286] Init: Account stored data load finished. (main_session.cpp : 25)
[12:53:29.192 00-0001297] Init: Read installed sticker sets. (storage_account.cpp : 25)
[12:53:29.368 00-0001298] Init: Read installed masks. (storage_account.cpp : 25)
[12:53:29.368 00-0001299] Init: Read installed emoji sets. (storage_account.cpp : 25)
[12:53:29.450 00-0001300] Init: Read featured sticker sets. (storage_account.cpp : 25)
[12:53:29.871 00-0001301] Init: Read featured emoji sets. (storage_account.cpp : 25)
[12:53:30.249 00-0001302] Init: Read recent stickers. (storage_account.cpp : 25)
[12:53:30.249 00-0001303] Init: Read recent masks. (storage_account.cpp : 25)
[12:53:30.249 00-0001304] Init: Read faved masks. (storage_account.cpp : 25)
[12:53:30.250 00-0001305] Init: Read saved GIFs. (storage_account.cpp : 25)
[12:53:30.267 00-0001306] Init: Account stored data load finished. (main_session.cpp : 25)
[12:53:30.293 00-0001315] Init: Read installed sticker sets. (storage_account.cpp : 25)
[12:53:30.293 00-0001316] Init: Read installed masks. (storage_account.cpp : 25)
[12:53:30.293 00-0001317] Init: Read installed emoji sets. (storage_account.cpp : 25)
[12:53:30.297 00-0001318] Init: Read featured sticker sets. (storage_account.cpp : 25)
[12:53:30.299 00-0001319] Init: Read featured emoji sets. (storage_account.cpp : 25)
[12:53:30.305 00-0001320] Init: Read recent stickers. (storage_account.cpp : 25)
[12:53:30.305 00-0001321] Init: Read recent masks. (storage_account.cpp : 25)
[12:53:30.305 00-0001322] Init: Read faved masks. (storage_account.cpp : 25)
[12:53:30.305 00-0001323] Init: Read saved GIFs. (storage_account.cpp : 25)
[12:53:30.307 00-0001324] Init: Account stored data load finished. (main_session.cpp : 25)
[12:53:30.307 00-0001333] Init: Read installed sticker sets. (storage_account.cpp : 25)
[12:53:30.312 00-0001334] Init: Read installed masks. (storage_account.cpp : 25)
[12:53:30.312 00-0001335] Init: Read installed emoji sets. (storage_account.cpp : 25)
[12:53:30.316 00-0001336] Init: Read featured sticker sets. (storage_account.cpp : 25)
[12:53:30.316 00-0001337] Init: Read featured emoji sets. (storage_account.cpp : 25)
[12:53:30.319 00-0001338] Init: Read recent stickers. (storage_account.cpp : 25)
[12:53:30.320 00-0001339] Init: Read recent masks. (storage_account.cpp : 25)
[12:53:30.320 00-0001340] Init: Read faved masks. (storage_account.cpp : 25)
[12:53:30.320 00-0001341] Init: Read saved GIFs. (storage_account.cpp : 25)
[12:53:30.320 00-0001342] Init: Account stored data load finished. (main_session.cpp : 25)

john-preston avatar Nov 17 '25 08:11 john-preston

have 2 hdd, tested both - same

Fresh or deleting this files give no delay But when you open stickers/emji menu - delay back (add/edit contact, opening story, sub menu emoji in history), even if delete files manuly in folder delay dont go, untill restart

 \tdata\D877F78*\ 

ABC1235E3DF9E698s    9,00mb
ABCD123CEFCA76BEs   5,64mb
ABCD123D48EBBD71s  3,09mb

this log with 3 big files (that +6s delay at start ) if delete files, finish go with no delay in log

[06:30:58.673 00-0000907] MTP Info: adding request to toSendMap, msCanWait 0 (session.cpp : 25)
[06:30:58.673 00-0000908] MTP Info: added, requestId 23 (session.cpp : 25)
[06:30:58.674 00-0000909] MTP Info: adding request to toSendMap, msCanWait 0 (session.cpp : 25)
[06:30:58.674 00-0000910] MTP Info: added, requestId 24 (session.cpp : 25)
[06:30:58.674 00-0000911] MTP Info: adding request to toSendMap, msCanWait 0 (session.cpp : 25)
[06:30:58.674 00-0000912] MTP Info: added, requestId 25 (session.cpp : 25)
[06:30:58.674 00-0000913] MTP Info: adding request to toSendMap, msCanWait 0 (session.cpp : 25)
[06:30:58.674 00-0000914] MTP Info: added, requestId 26 (session.cpp : 25)
[06:30:58.674 00-0000915] Init: Read installed sticker sets. (storage_account.cpp : 25)
[06:30:59.193 00-0000916] Init: Read installed masks. (storage_account.cpp : 25)
[06:30:59.193 00-0000917] Init: Read installed emoji sets. (storage_account.cpp : 25)
[06:31:00.980 00-0000918] Init: Read featured sticker sets. (storage_account.cpp : 25)
[06:31:01.490 00-0000919] Init: Read featured emoji sets. (storage_account.cpp : 25)
[06:31:01.968 00-0000920] Init: Read recent stickers. (storage_account.cpp : 25)
[06:31:01.973 00-0000921] Init: Read recent masks. (storage_account.cpp : 25)
[06:31:01.973 00-0000922] Init: Read faved masks. (storage_account.cpp : 25)
[06:31:01.974 00-0000923] Init: Read saved GIFs. (storage_account.cpp : 25)

[06:31:06.617 00-0000924] Init: Account stored data load finished. (main_session.cpp : 25)
[06:31:06.632 00-0000925] MTP Info: dcWithShift 2 stopped send timer, can wait for 0ms from current 0 (session.cpp : 25)

Also got-send crash on old-main login with debug-on and just "channel viewing": Crash ID: 1f886b5e-9516-454d-a358-f24c02c7796c

reportingtg avatar Nov 18 '25 19:11 reportingtg

@reportingtg this crash is deadlock-detecting code, but I this looks like a false positive.. this code only works with debug logs enabled.

john-preston avatar Nov 20 '25 17:11 john-preston

6 secods also affect on "open chat in new window"

All tested in "Windows safe mode" - bug repeats

reportingtg avatar Nov 26 '25 10:11 reportingtg

delay affect also files upload

@john-preston Tested on dedicated server with nvme, delay is 4,7 second - same thing You see my username in bug report? can you contact me and i give you my account so you can test it self or send in on any official mail telegram?

Or i can try test adding 1 by 1 adding stickers, But i dont know how to export it links

reportingtg avatar Dec 13 '25 22:12 reportingtg