Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abnormal increase in RAM #27

Open
ehsansafari opened this issue Sep 8, 2021 · 3 comments
Open

abnormal increase in RAM #27

ehsansafari opened this issue Sep 8, 2021 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@ehsansafari
Copy link

why, if I use this line of code, the RAM memory will gradually increase with a lot of cash, so that 3 gigs will be added to the RAM memory in 5 minutes and 7 gigs will be added in 10 minutes.
let chat = rasync_api.get_chat(GetChat::builder().chat_id(message.chat_id()).build()).await?;

doc_2021-09-08_14-13-50.mp4

but when I delete the line code, the RAM does not increase and remains constant?

2021-09-08 12_57_23-Window

source code : telegram-client/examples/client_async.rs
run code : cargo build --release

@fewensa
Copy link
Owner

fewensa commented Sep 8, 2021

I think the reason about there,

thread::spawn(move || {
futures::executor::block_on(async move {
Handler::new(
api.as_ref(),
&event_lout,
&rasync_lout,
warn_unregister_listener.borrow(),
)
.handle(&json)
.await;
});
});
}
, many threads are not dropped. I'm not sure, need to investigate this issue

@fewensa fewensa added enhancement New feature or request question Further information is requested labels Sep 8, 2021
@ehsansafari
Copy link
Author

ehsansafari commented Sep 9, 2021

, many threads are not dropped. I'm not sure, need to investigate this issue

exactly, i think all functions called from rasync_api() threads not dropped

@fewensa
Copy link
Owner

fewensa commented Sep 9, 2021

I'm not sure this is the reason now, I will investigate this issue, if you find anything, please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants