Closed ilyalatt closed 2 years ago
@tarasverq @GihanSoft If you have any ideas about how to simplify Telega submit them here please
You can use immutable arrays instead of read only list. It's part of .net standard (I think 2.1, and can be added to net standard 2.0 with nuget)
Check function for still connection stable.
Use SignInResult instead of exception. Exceptions have impact that effect performance a lot.
Proxy. Specially socks5 and mt proto (Http can be added too)
Set xml document in code for all public APIs. Start from Telegram Client. And web document and guides.
Use rasolyn addins for async that can be added with nuget (don't include in build, just compile time.) Can help fix async problems.
Change Upload to IO or UpDowdLoad or File or something like that. Because it uses for download too.
Use SignInResult instead of exception. Exceptions have impact that effect performance a lot.
Performance is not critical on the sign in step. Much more CPU time is used for generating request. And a lot of time is just awaiting a call result. That's from pragmatic point of view.
From theoretical point of view there is RpcResult
that resembles needed behavior. CallUnsafe
can be introduced that creates exception but not throws it. SignIn
can check an exception and return an error instead of throwing an exception.
But I am not sure because looks like it will complicate things more than needed.
Use SignInResult instead of exception. Exceptions have impact that effect performance a lot.
Performance is not critical on the sign in step. Much more CPU time is used for generating request. And a lot of time is just awaiting a call result. That's from pragmatic point of view. From theoretical point of view there is
RpcResult
that resembles needed behavior.CallUnsafe
can be introduced that creates exception but not throws it.SignIn
can check an exception and return an error instead of throwing an exception. But I am not sure because looks like it will complicate things more than needed.
Ok, if it's not easy, no problem
Hi everybody!
My wish list is:
One more request: parallel download and upload of file parts inside of TelegramClientUpload
class.
It should increase the speed of downloading and uploading.
May be I'll do it if you don't mind?
One more request: parallel download and upload of file parts inside of
TelegramClientUpload
class. It should increase the speed of downloading and uploading.May be I'll do it if you don't mind?
Yeah, Sure. You'll need to modify DelayMiddleware
. Right now it puts all calls in a task queue. So it should ignore a task queue for file requests. Then you need to modify TaskQueue
to allow count
to be more than one. It will be used in Downloading/Uploading. Then you need to create a task queue with degree 4 for example and put calls in it. It will look like fileRequests.Select(x => _taskQueue.Put(_tg.Call(x)))
.
There is a lot of stuff that was planned and never happened. What is done is published under v0.5.0
. The rest is moved to #80.
Because of @GihanSoft recent activity I got interest to Telega. I wanted to simplify the public interface a long time ago. I realized that it is too hard for a lot of developers. Because of that some devs avoid the library. Now I feel that I can spend a few days to implement my plan. I want to gather what I made and what I want to make for the new release.
./generate-dto.sh
ConfigureAwait(false)
IReadOnlyList<T>
instead ofArr<T>
T?
instead ofOption<T>
LanguageExt
dependency removal