telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.23k stars 5.2k forks source link

Application start is extremely slow #26434

Closed skarusto closed 9 months ago

skarusto commented 1 year ago

Steps to reproduce

Start Telegram Desktop (both desktop and portable versions are affected)

Expected behaviour

Telegram Desktop starts up in less than five seconds

Actual behaviour

Telegram Desktop starts up in over 15 seconds. Looking at logs, I noticed that there is a pause about 10-15 seconds on each startup on the step before initializing audio devises. I've checked with differend audio devices as well - the same behavior.

Operating system

Windows 11 22H2 (22621.1848)

Version of Telegram Desktop

4.8.3 x64

Installation source

Static binary from official website

Crash ID

No response

Logs

[2023.06.20 11:57:53] Launched version: 4008003, install beta: [FALSE], alpha: 0, debug mode: [FALSE]
[2023.06.20 11:57:53] Executable dir: C:/Users/username/AppData/Roaming/Telegram Desktop/, name: Telegram.exe
[2023.06.20 11:57:53] Initial working dir: C:/Users/username/AppData/Roaming/Telegram Desktop/
[2023.06.20 11:57:53] Working dir: C:/Users/username/AppData/Roaming/Telegram Desktop/
[2023.06.20 11:57:53] Command line: C:\Users\username\AppData\Roaming\Telegram Desktop\Telegram.exe
[2023.06.20 11:57:53] Executable path before check: C:/Users/username/AppData/Roaming/Telegram Desktop/Telegram.exe
[2023.06.20 11:57:53] Logs started
[2023.06.20 11:57:54] Connecting local socket to Global\63a5b30779d1ea2f1e1ecc26d4d31231-{87A94AB0-E370-4cde-98D3-ACC110C5967D}...
[2023.06.20 11:57:54] This is the only instance of Telegram, starting server and app...
[2023.06.20 11:57:54] Moved logging from 'C:/Users/username/AppData/Roaming/Telegram Desktop/log_start0.txt' to 'C:/Users/username/AppData/Roaming/Telegram Desktop/log.txt'!
[2023.06.20 11:57:54] Global devicePixelRatio: 1
[2023.06.20 11:57:54] QT_DPI_ADJUSTMENT_POLICY: AdjustDpi
[2023.06.20 11:57:54] Primary screen DPI: 96, Base: 96.
[2023.06.20 11:57:54] Computed screen scale: 100
[2023.06.20 11:57:54] DevicePixelRatio: 1
[2023.06.20 11:57:54] ScreenScale: 100
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAOpenSansRegular.ttf' loaded 'DAOpenSansRegular'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAOpenSansRegularItalic.ttf' loaded 'DAOpenSansRegularItalic'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2023.06.20 11:57:54] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.06.20 11:57:54] Using DirectX compiler 'C:\Users\username\AppData\Roaming\Telegram Desktop\modules\x64\d3d\d3dcompiler_47.dll'.
[2023.06.20 11:57:54] App Info: reading settings...
[2023.06.20 11:57:54] App Info: reading encrypted settings...
[2023.06.20 11:57:54] Lang Info: Loaded cached, keys: 4994
[2023.06.20 11:57:54] OpenAL Logging Level: (not set)
[2023.06.20 11:58:07] Audio Playback Devices: OpenAL Soft on SteelSeries Sonar - Gaming (SteelSeries Sonar Virtual Audio Device);OpenAL Soft on SteelSeries Sonar - Aux (SteelSeries Sonar Virtual Audio Device);OpenAL Soft on SteelSeries Sonar - Media (SteelSeries Sonar Virtual Audio Device);OpenAL Soft on Наушники (2- Arctis 7+);OpenAL Soft on Динамики (Realtek(R) Audio);OpenAL Soft on SteelSeries Sonar - Microphone (SteelSeries Sonar Virtual Audio Device);OpenAL Soft on SteelSeries Sonar - Chat (SteelSeries Sonar Virtual Audio Device)
[2023.06.20 11:58:07] Audio Playback Default Device: OpenAL Soft on SteelSeries Sonar - Gaming (SteelSeries Sonar Virtual Audio Device)
[2023.06.20 11:58:07] Audio Capture Devices: OpenAL Soft on SteelSeries Sonar - Microphone (SteelSeries Sonar Virtual Audio Device);OpenAL Soft on Микрофон (2- Arctis 7+)
[2023.06.20 11:58:07] Audio Capture Default Device: OpenAL Soft on SteelSeries Sonar - Microphone (SteelSeries Sonar Virtual Audio Device)
[2023.06.20 11:58:08] App Info: reading accounts info...
[2023.06.20 11:58:08] App Info: reading encrypted info...
[2023.06.20 11:58:08] App Info: reading map...
[2023.06.20 11:58:08] App Info: reading encrypted map...
[2023.06.20 11:58:08] App Info: reading encrypted user settings...
[2023.06.20 11:58:08] App Info: encrypted user settings read.
[2023.06.20 11:58:08] App Info: reading encrypted mtp data...
[2023.06.20 11:58:08] MTP Info: read keys, current: 4, to destroy: 0
[2023.06.20 11:58:08] Map read time: 1
[2023.06.20 11:58:08] App Info: reading encrypted mtp config...
[2023.06.20 11:58:08] Export Info: Destroy top bar by controller removal.
[2023.06.20 11:58:08] OpenGL: Using custom 'gpu_driver_bug_list.json'.
[2023.06.20 11:58:08] OpenGL Profile: OpenGLES.
[2023.06.20 11:58:08] OpenGL Renderer: ANGLE (NVIDIA, NVIDIA GeForce RTX 2080 Direct3D11 vs_5_0 ps_5_0, D3D11-31.0.15.3179)
[2023.06.20 11:58:08] OpenGL Vendor: Google Inc. (NVIDIA)
[2023.06.20 11:58:08] OpenGL Version: OpenGL ES 3.0.0 (ANGLE 2.1.7 git hash: 0bb011f9e403)
[2023.06.20 11:58:08] OpenGL Extensions: GL_OES_EGL_image_external, GL_OES_packed_depth_stencil, GL_ANGLE_lossy_etc_decode, GL_OES_get_program_binary, GL_ANGLE_translated_shader_source, GL_OES_EGL_image, GL_ANGLE_explicit_context, GL_EXT_color_buffer_half_float, GL_OES_fbo_render_mipmap, GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture, GL_ANGLE_program_cache_control, GL_OES_compressed_ETC2_sRGB8_texture, GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture, GL_NV_EGL_stream_consumer_external, GL_CHROMIUM_sync_query, GL_EXT_shader_texture_lod, GL_EXT_texture_rg, GL_ANGLE_base_vertex_base_instance, GL_EXT_read_format_bgra, GL_ANGLE_get_tex_level_parameter, GL_OES_draw_buffers_indexed, GL_EXT_multisampled_render_to_texture, GL_EXT_map_buffer_range, GL_EXT_robustness, GL_EXT_discard_framebuffer, GL_OES_compressed_EAC_RG11_signed_texture, GL_CHROMIUM_copy_compressed_texture, GL_EXT_sRGB, GL_EXT_texture_filter_anisotropic, GL_EXT_debug_label, GL_OES_mapbuffer, GL_ANGLE_get_serialized_context_string, GL_NV_pack_subimage, GL_CHROMIUM_bind_generates_resource, GL_WEBGL_video_texture, GL_ANGLE_texture_multisample, GL_ANGLE_pack_reverse_row_order, GL_EXT_disjoint_timer_query, GL_NV_pixel_buffer_object, GL_EXT_texture_compression_dxt1, GL_EXT_float_blend, GL_EXT_texture_compression_bptc, GL_EXT_texture_compression_rgtc, GL_KHR_debug, GL_OES_compressed_EAC_R11_unsigned_texture, GL_OES_compressed_EAC_RG11_unsigned_texture, GL_ANGLE_texture_compression_dxt3, GL_OES_compressed_ETC2_sRGB8_alpha8_texture, GL_OES_standard_derivatives, GL_CHROMIUM_lose_context, , GL_OES_texture_half_float, GL_EXT_texture_compression_s3tc_srgb, GL_CHROMIUM_copy_texture, GL_NV_fence, GL_ANGLE_request_extension, GL_OES_texture_float_linear, GL_ANGLE_texture_compression_dxt5, GL_OES_texture_float, GL_OES_texture_half_float_linear, GL_OES_rgb8_rgba8, GL_ANGLE_instanced_arrays, GL_OES_compressed_ETC2_RGB8_texture, GL_OES_texture_npot, GL_EXT_debug_marker, GL_EXT_unpack_subimage, GL_OES_depth24, GL_EXT_blend_func_extended, GL_ANGLE_multi_draw, GL_CHROMIUM_bind_uniform_location, GL_EXT_texture_format_BGRA8888, GL_ANGLE_framebuffer_blit, GL_OES_texture_border_clamp, GL_EXT_blend_minmax, GL_EXT_draw_elements_base_vertex, GL_EXT_EGL_image_external_wrap_modes, GL_OES_element_index_uint, GL_EXT_texture_norm16, GL_ANGLE_copy_texture_3d, GL_EXT_draw_buffers, GL_OES_texture_stencil8, GL_OES_vertex_array_object, GL_EXT_texture_storage, GL_OES_depth32, GL_OES_EGL_image_external_essl3, GL_EXT_color_buffer_float, GL_OVR_multiview2, GL_ANGLE_memory_size, GL_KHR_parallel_shader_compile, GL_OES_compressed_ETC2_RGBA8_texture, GL_OES_draw_elements_base_vertex, GL_OES_compressed_EAC_R11_signed_texture, GL_OVR_multiview, GL_ANGLE_explicit_context_gles1, GL_EXT_draw_buffers_indexed, GL_ANGLE_texture_usage, GL_ANGLE_client_arrays, GL_EXT_frag_depth, GL_ANGLE_depth_texture, GL_OES_surfaceless_context, GL_ANGLE_multiview_multisample, GL_ANGLE_provoking_vertex, GL_ANGLE_framebuffer_multisample, GL_ANGLE_robust_client_memory, GL_EXT_instanced_arrays, GL_EXT_occlusion_query_boolean
[2023.06.20 11:58:08] EGL Extensions: EGL_EXT_create_context_robustness, EGL_ANGLE_d3d_share_handle_client_buffer, EGL_ANGLE_d3d_texture_client_buffer, EGL_ANGLE_surface_d3d_texture_2d_share_handle, EGL_ANGLE_query_surface_pointer, EGL_ANGLE_window_fixed_size, EGL_ANGLE_keyed_mutex, EGL_ANGLE_surface_orientation, EGL_ANGLE_direct_composition, EGL_ANGLE_windows_ui_composition, EGL_NV_post_sub_buffer, EGL_KHR_create_context, EGL_KHR_image, EGL_KHR_image_base, EGL_KHR_gl_texture_2D_image, EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image, EGL_KHR_get_all_proc_addresses, EGL_KHR_stream, EGL_KHR_stream_consumer_gltexture, EGL_NV_stream_consumer_gltexture_yuv, EGL_ANGLE_flexible_surface_compatibility, EGL_ANGLE_stream_producer_d3d_texture, EGL_ANGLE_create_context_webgl_compatibility, EGL_CHROMIUM_create_context_bind_generates_resource, EGL_CHROMIUM_sync_control, EGL_EXT_pixel_format_float, EGL_KHR_surfaceless_context, EGL_ANGLE_display_texture_share_group, EGL_ANGLE_display_semaphore_share_group, EGL_ANGLE_create_context_client_arrays, EGL_ANGLE_program_cache_control, EGL_ANGLE_robust_resource_initialization, EGL_ANGLE_create_context_extensions_enabled, EGL_ANDROID_blob_cache, EGL_ANDROID_recordable, EGL_ANGLE_image_d3d11_texture, EGL_ANGLE_create_context_backwards_compatible, EGL_KHR_create_context_no_error, EGL_KHR_reusable_sync, 
[2023.06.20 11:58:08] OpenGL: QOpenGLContext created, version: 3.3.
[2023.06.20 11:58:08] OpenGL: [TRUE] (Window)
[2023.06.20 11:58:10] API Warning: not loaded minimal channel applied.
[2023.06.20 11:58:10] API Warning: not loaded minimal channel applied.
Aokromes commented 1 year ago

you have a lot of fonts installed?

ilya-fedin commented 1 year ago

@Aokromes the next code line after the "OpenAL logging level" log line is calling devices enumeration, so the issue is somewhere in OpenAL's enumeration code or Windows drivers. https://github.com/telegramdesktop/tdesktop/blob/cadacc1f51c3192979dca0463daad5e8cf79bd0a/Telegram/SourceFiles/media/audio/media_audio.cpp#L196-L200

skarusto commented 1 year ago

you have a lot of fonts installed?

Yes, they're needed for graphic design, but I believe it's not the root cause of the issue, I've already had a lot of fonts installed before and there were no issues with Telegram.

As I desctibed in the "Behavior" part and as @ilya-fedin noticed, the problem is definitely around OpenAL / audio devices

I'm not sure what to do, cuz the first thing I've tried - reinstalling audio drivers and disabling all audio devices.

github-actions[bot] commented 10 months ago

Hey there!

This issue was inactive for a long time and will be automatically closed in 30 days if there isn't any further activity. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the issue.

Thanks!