I am trying to understand a particular ejabberd_config function convert_table_to_binary
. I notice that this function is always used during my break down of the both mod_roster and mod_last modules. All the mnesia tables are "converted" to binary up front. I am not able to locate any documentation on this so I am asking the question here. What are benefits of calling ejabberd_config:convert_table_to_binary/5
? Also are there performance gains to using this function?
You do not need to call ejabberd_config.convert_table_to_binary/5
when you build your own modules.
This is a function that is use to migrate from old version of ejabberd, where data were stored in list and not binary.
Now, all data inside ejabberd are managed as binary, so it is mostly useless, unless you need to migrate data.
If you write a new module you are supposed to manipulate and store data as binary, but this function is not intended for that. Binary usage must be built-in into your code.