I’m going to use serialize to store some big array to save into mySQL, and I wonder if this method costs countable performace ?
[edit]
The array I’m going to store is the user’s price lists. I made a dynamic form for user to type in their price list, and each pricelist contains about 20 to 100 lines. Each line has 4 fields : product_name, unit, wholesale price, retail price.
I just want to save the lists & re-display them, not for querying by SQL.
Serialize takes a long time for big things and a short time for little things. How big are your things and how fast do you need things to be?
You could directly measure the cost in microseconds of serialize() for your particular arrays with something like
Or there are lots of other profiling options if you want to be professional about it.