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

some questions about type_cast_row_data #147

Open
redink opened this issue Sep 25, 2014 · 1 comment
Open

some questions about type_cast_row_data #147

redink opened this issue Sep 25, 2014 · 1 comment

Comments

@redink
Copy link

redink commented Sep 25, 2014

Hi,

In my product system, I will fetch very large data from MySQL sometimes, and I using Emysql. In this case, I always got long_�gc warnings, just like:

 monitor long_gc <0.15110.2> [{initial_call,{erlang,apply,2}},{almost_current_function,{io_lib_fread,fread_skip_white,2}},{message_queue_len,0}] [{timeout,59},{old_heap_block_size,1439468},{heap_block_size,1199557},{mbuf_size,0},{stack_size,49},{old_heap_size,79145},{heap_size,15269}]
 monitor long_gc <0.15106.2> [{initial_call,{erlang,apply,2}},{almost_current_function,{emysql_tcp,type_cast_row_data,2}},{message_queue_len,0}] [{timeout,63},{old_heap_block_size,1439468},{heap_block_size,1199557},{mbuf_size,0},{stack_size,53},{old_heap_size,16491},{heap_size,16069}]

So far, I guess the reason of this case:
https://github.com/Eonblast/Emysql/blob/master/src/emysql_tcp.erl#L253

In function to_date, to_float �Data will be converted into �list from binary, then using io_lib module. And, what do you think about ?

In addition, I am testing "plan b", https://github.com/redink/redink_toys/tree/master/research_for_fun/type_cv

Thanks.

@jlouis
Copy link
Collaborator

jlouis commented Sep 26, 2014

This is probably going to be slow yes. Speeding up the conversion here is definitely possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants