How to chunck into characters of max 256 and consume API efficiently?
Hi guys i need to chunck the texts into chunck of 256 characters string in order to use it in as an argument when consuming an api. So I am wondering what the efficient and fast way would be for doing this with minimal performance loss. I self tought to: 1 - Check per text attribute the length of it, and if longer then 256 characters, make a new "Chunck(s)" entities below the enitity of that attribute. Set the chunk in the API Queue 2 - Consume the API with the chunk Anyone an better idea?
I think you have a good idea. If you keep the Chunks entity non-persistent I think you will have absolutely no problems.
Otherwise, i.e. if you use persistent object you might notice slight memory problems, but only if the string is really big e.g. largere than 256*1000 =256 000 chatacters IOP.
Regardless of whuch type of entity you choose, there will probably be no time concerns. For most APIs it is ussually the case that time is mainly spent waiting for I/O.