Commit Graph

1154 Commits

Author SHA1 Message Date
levlam
60f094bdf2 Move ConcurrentHashMap test out of namespace td. 2022-10-21 13:18:58 +03:00
levlam
5217a86e0d Support redirect_stderr in AsyncFileLog. 2022-10-15 10:17:42 +03:00
levlam
ee28a37906 Minor improvements. 2022-10-12 15:59:58 +03:00
levlam
683627a350 Make all operator bool const and nonexcept. 2022-10-09 19:30:18 +03:00
levlam
7f5f6e41ad Minor improvements. 2022-10-09 19:00:14 +03:00
levlam
5a29dcd337 Avoid redundant usages of Status::error(). 2022-10-09 14:15:54 +03:00
levlam
78ba8fa983 Add AsyncFileLog. 2022-10-09 13:04:57 +03:00
levlam
f12b2f5efe Fix warning. 2022-10-08 20:54:58 +03:00
levlam
4af5c4f5dd Add logging for slow logging to file. 2022-10-05 23:55:50 +03:00
levlam
67aa7082d6 Add thread.get_id() test. 2022-10-04 23:00:02 +03:00
levlam
e984706622 Add td:🧵:get_id(). 2022-10-04 22:48:55 +03:00
levlam
628b8901bc Optimize logging to NULL on Windows. Fixes #2112.
It is possible to do only about 100 writes to NULL per second, which is about 8-80 times less than even performance of writes to a console app.
2022-10-03 15:11:23 +03:00
levlam
10680fe353 Minor improvements. 2022-10-03 14:39:20 +03:00
levlam
8f0ffd0a65 Reduce MAX_STORAGE_SIZE for wait free hash tables to reduce split_storage time. 2022-09-30 16:38:11 +03:00
levlam
ee04923ce1 Add lazy initialization for keyword_stickers_map_. 2022-09-27 16:16:36 +03:00
levlam
66dca9a510 Update emoji to 15.0. 2022-09-27 14:28:08 +03:00
levlam
99a2ffdcec Update Unicode tables to 15.0. 2022-09-27 14:22:30 +03:00
levlam
4a6e0aea43 Add utf8_prepare_search_string. 2022-09-27 14:16:09 +03:00
levlam
b3e16c5dd7 Use the same template recursively for instant view links. 2022-09-26 19:24:39 +03:00
levlam
faa738d6a9 Keep only Slice overload of utf8_utf16_substr. 2022-09-22 12:08:34 +03:00
levlam
5c5d19e76f Increase 8 times number of WaitFreeMap storages. 2022-09-22 07:13:17 +03:00
levlam
b6db8a66ec Remove dangerous Timestamp::store. 2022-09-21 14:25:31 +03:00
levlam
275ee280d2 Use thread-local EVP_MD_CTX in OpenSSL 3.0. 2022-09-19 18:17:51 +03:00
levlam
cb70993b90 Fix buggy behavior of pthread_setaffinity_np/pthread_getaffinity_np on NetBSD. 2022-09-17 23:25:42 +03:00
levlam
e37f3c17af Fix warnings. 2022-09-17 22:54:21 +03:00
levlam
9bf5d57851 Add TD_HAVE_THREAD_AFFINITY macros. 2022-09-17 21:58:00 +03:00
levlam
b8abc6c19e Support CPU affinity on NetBSD. 2022-09-17 21:48:16 +03:00
levlam
b47fce0d95 Support CPU affinity on FreeBSD. 2022-09-17 14:45:42 +03:00
levlam
9d5c151a3f Use DWORD as thread::id on Windows. 2022-09-17 13:21:04 +03:00
levlam
0cc3fb0e9d Include pthread.h on OpenBSD for pthread_t definition. 2022-09-17 01:37:05 +03:00
levlam
0025c4164b Add internalLinkTypeInstantView. 2022-09-16 01:30:54 +03:00
levlam
b49b669ac1 Support affinity mask on Linux. 2022-09-14 15:33:16 +03:00
levlam
0eddd8d405 Add thread::set_affinity_mask/get_affinity_mask. 2022-09-14 14:38:14 +03:00
levlam
5f98548e02 Use STL thread only on Windows. 2022-09-14 14:19:09 +03:00
levlam
273ae92a14 Use HANDLE as thread id on Windows. 2022-09-14 14:18:42 +03:00
levlam
03db53281c Remove this_thread::yield for TD_THREAD_UNSUPPORTED. 2022-09-14 14:10:33 +03:00
levlam
ce9175a00b Always use "must be non-empty". 2022-09-10 22:48:34 +03:00
levlam
9fc136976c Remove ChainBufferWriter::init. 2022-09-06 12:42:00 +03:00
levlam
17bb58d8bb Improve NetBSD build instructions. 2022-09-04 17:50:03 +03:00
levlam
ba2c071324 Use explicit EVP_CIPHER_fetch with OpenSSL 3.0, because EVP_aes_* fetch algorithm each time and are extremely slow in OpenSSL 3.0. 2022-08-29 21:16:12 +03:00
levlam
5e87cae73d Remove unused Evp::init parameter. 2022-08-29 20:41:35 +03:00
levlam
398a996ef8 Use explicit EVP_MD_fetch with OpenSSL 3.0, because EVP_sha* fetch algorithm each time and are extremely slow in OpenSSL 3.0. 2022-08-29 16:19:47 +03:00
levlam
28594d38e4 Add thread::send_real_time_signal. 2022-08-22 00:46:22 +03:00
levlam
959c7261c1 Fix function name. 2022-08-22 00:17:53 +03:00
levlam
91bdc57ecc Add WaitFreeHashSet.h to CMakeLists.txt. 2022-08-21 13:36:17 +03:00
levlam
59a5f15a41 Add WaitFreeHashSet. 2022-08-20 16:19:58 +03:00
levlam
1afbbe5fca Add table for small codes in get_unicode_simple_category. 2022-08-19 19:50:34 +03:00
levlam
88b52f1535 Use variable step in unicode_simple_category_jump_pos. 2022-08-19 18:56:36 +03:00
levlam
231c47e237 Use linear search in get_unicode_simple_category. 2022-08-19 18:06:29 +03:00
levlam
5c9d306208 Optimize get_unicode_simple_category with jump table. 2022-08-19 17:56:47 +03:00
levlam
96cca84a60 Remove source from next_utf8_unsafe. 2022-08-19 16:37:44 +03:00
levlam
a8b3573a00 Always pass non-null pointer to next_utf8_unsafe. 2022-08-19 16:19:58 +03:00
levlam
8f433070df Minor fixes. 2022-08-14 15:04:08 +03:00
levlam
9e4ae8997b Fix WaitFreeHashMap::get_pointer. 2022-08-04 22:40:22 +03:00
levlam
616455088f Improve WaitFreeHashMap. 2022-08-04 15:25:46 +03:00
levlam
6f46b50b4b Add WaitFreeHashMap::foreach. 2022-08-04 15:08:18 +03:00
levlam
08dbc7d9f2 Add operator[] to WaitFreeHashMap. 2022-08-04 00:38:13 +03:00
levlam
98afc516dc Use WaitFreeVector in Enumerator. 2022-08-03 22:51:07 +03:00
levlam
2be8c86855 Optimize size() and empty() for WaitFreeVector. 2022-08-03 22:48:18 +03:00
levlam
36693a3872 Support unique_ptr values in WaitFreeHashMap. 2022-08-03 21:17:10 +03:00
levlam
2d705004a3 Add WaitFreeVector. 2022-08-02 14:27:18 +03:00
levlam
64c718c0a1 Fix suppression of an expected error. 2022-08-01 19:34:37 +03:00
levlam
d55869eedb Minor improvements. 2022-07-23 14:53:32 +03:00
levlam
36a57c3584 Remove unneeded FlatHashTable copy constructors. 2022-07-23 11:13:17 +03:00
levlam
0f87447ffc Asynchronously destroy some big data storages. 2022-07-20 13:40:14 +03:00
levlam
ac8af37872 Add size() and empty() to WaitFreeHashMap. 2022-07-20 13:35:32 +03:00
levlam
6eef50f769 Remove unused DelayedClosure private constructors. 2022-07-17 12:11:04 +03:00
levlam
2cc8f34a7d Remove unused to_delayed_closure functions. 2022-07-17 11:41:31 +03:00
levlam
04a7583bd0 Remove unused Event::clone method. 2022-07-17 10:41:17 +03:00
levlam
0bdd15fe9f Fix warning. 2022-07-15 00:06:41 +03:00
levlam
abc9ed2cd9 Minor fixes. 2022-07-14 18:38:48 +03:00
Arseny Smirnov
bf80c43c05 fix CE 2022-07-14 18:36:46 +04:00
Arseny Smirnov
f4c97b25ec add Mutex wrapper around std::mutex and use it instead of SpinLock 2022-07-14 16:27:06 +04:00
Arseny Smirnov
7ddc3099f6 remove td::this_thread::yield function. usleep_for(1) used instead 2022-07-14 16:15:17 +04:00
levlam
6eb03bdc8b Generate GitCommitHash.cpp during building. 2022-07-11 12:20:31 +03:00
levlam
bb5ebc09ef Disable git commit hash calculation, because the current approach must be completely replaced. 2022-07-09 22:27:41 +03:00
levlam
d37ad61f86 Generate GIT_COMMIT and GIT_DIRTY from CMake. 2022-07-08 20:56:43 +03:00
levlam
ff3235e6d5 Update comment. 2022-07-07 22:23:58 +03:00
levlam
f8b49fe421 Ensure that gen_git_commit_h works even without git. 2022-07-07 20:38:44 +03:00
levlam
cb559c396d Use FlatHashTable instead of std::unordered_map/std::unordered_set. 2022-06-30 00:59:27 +03:00
levlam
26fdb92dd8 Minor improvements. 2022-06-28 15:32:05 +03:00
levlam
ebebe0300c Move promise_send_closure to PromiseFuture.h. 2022-06-28 14:02:14 +03:00
levlam
340fb779c3 Move Promise implementation details to namespace detail. 2022-06-28 10:48:03 +03:00
levlam
003fa6ffee Remove back template lambda support in Promise. 2022-06-28 10:32:56 +03:00
levlam
32bac7bd24 Move Promise to tdutils. 2022-06-27 13:30:18 +03:00
levlam
b97bd4848b Allow to inline BufferAllocator::track_buffer_slice. 2022-06-24 19:00:29 +03:00
levlam
70f7373729 Pretend that statistics is collected at least for a second on start. 2022-06-21 20:06:39 +03:00
levlam
1e417ea212 Minor fixes. 2022-06-02 16:19:16 +03:00
levlam
33d1dfec0e Add LargeFiles test. 2022-05-11 19:03:03 +03:00
levlam
1b5798393d Move FloodControlGlobal to tdutils. 2022-06-09 17:12:59 +03:00
levlam
a282cce5d4 Add and use utf8_encode. 2022-05-31 15:08:16 +03:00
levlam
83b7be1af9 Ignore expected unprocessed error in def_load:system lib. 2022-05-26 17:06:00 +03:00
levlam
5fda16c89e Add WaitFreeHashMap. 2022-05-19 19:22:33 +03:00
levlam
e4bff687cf Add td::remove_emoji_selectors test. 2022-05-12 19:18:14 +03:00
levlam
805e4d4a25 Add get_fitzpatrick_modifier test. 2022-05-12 19:11:17 +03:00
levlam
e6738efa3f Add test for remove_emoji_modifiers. 2022-05-12 19:04:37 +03:00
levlam
6377a15d02 Move is_emoji test to separate file. 2022-05-12 18:45:25 +03:00
levlam
de5f047dba Remove all emoji modifiers, including modifiers in the middle. 2022-05-12 18:02:27 +03:00
levlam
bb0908504b Fix clean_filename test. 2022-05-12 13:10:19 +03:00
levlam
6b838b706b Increase bound for unique_ptr-based HashTable node usage to improve performance. 2022-05-02 20:46:20 +03:00