I am creating a vb.net winforms application that the user will find in given strings, parse them and print the label The variable information given string will be used in all labels, but the variable portion of the string will be replaced with each label.
My question is this: Is it better to parse the string once, then it is better to store these values, arrays or parse each string to print a label? Which will perform better? Which is better practice? What is the proper way to test something like this?
If the data is stored for saving the memory, my preference should not be there Until I knew that parsing is actually a performance problem, which I find out.
Normally my thumb rule is - less data structure better . If you have a data structure, then you should be worried about getting stale about it, and whenever you change the program, you have more code to modify and put in the bug. In addition to this, there is no need to slow down parsing, especially than what you are doing.
Comments
Post a Comment