Open avieini opened 5 years ago
I donnot understand much of your code. but you should definitely store all you data in a variable and write them at once in another thread. maybe another process
Maybe have datachange_notification
just save the value to a dict with the node name being the key. Then every 1 second just write the dict to CSV.
Either way I would not write directly to file in datachange_notification
on every subscription update.
Hi, Thanks for your answers! I tried save to a variable and write it all at once, but then I have lags in the streaming while the program is writing the variable to a file. Do you have any other suggestions?
Hi, I'm trying to write data from Kepserver server (V6) Simulator to a csv file: I have predefined list of tags I want to read each second. I tried split it to different to separate proccesses where each process has it own file but when I work with large-scale of tags (say 5000 for each process) I found out that I have lag between to consecutive request from the server (either a problem from the server side or problem caused by my code which cannot write so many tag so fast) I used the basic handler in the examples and I suspect that the problem is that I write each tag separately instead of write them all at once. I will be very glad if someone can have a look and help to improve it. Thanks!
the code: