Openbravo Issue Tracking System - Retail Modules
View Issue Details
0021072Retail ModulesWeb POSpublic2012-07-13 13:572015-01-20 14:25
iperdomo 
guilleaer 
lowminoralways
newopen 
303.4.4-1-ARCH
 
 
No
0021072: Order cache stores the serialized version of the product image, resulting in a waste of space
When you add a ticket, on every ticket modification action, we're storing the ticket in a local client database. This ticket gets serialized in a JSON format.

If you add images (thumbnails) to your products, the serialized version of the ticket contains the base64 version of the image; resulting in a waste of space.
* Disable the removal of the ticket after sending the ticket to the server (see OB.UTIL.processOrders)
* Add an image to 1 product (in Openbravo)
* Create a ticket using the product configured before
* Check the resulting record in the database
---
Some numbers:
1 order with 10 lines ~ 8KB
1 order with 10 lines (with image) ~ 64KB
Remove the image when serializing the ticket object before saving it in the client database
No tags attached.
? order.json (12,900) 2012-07-14 12:14
https://issues.openbravo.com/file_download.php?file_id=5432&type=bug
Issue History
2012-07-13 13:57iperdomoNew Issue
2012-07-13 13:57iperdomoAssigned To => alostale
2012-07-13 14:01iperdomoAssigned Toalostale => AugustoMauch
2012-07-14 12:14iperdomoNote Added: 0050575
2012-07-14 12:14iperdomoFile Added: order.json
2012-12-20 17:55iciordiaAssigned ToAugustoMauch => guilleaer
2013-02-06 10:42migueldejuanaTarget Version => RMP20
2013-02-28 08:13marvintmTarget VersionRMP20 =>
2013-08-08 03:48eintelauIssue Monitored: eintelau
2015-01-20 14:25mtaalTriggers an Emergency Pack => No
2015-01-20 14:25mtaalPriorityurgent => low
2015-01-20 14:25mtaalSeveritymajor => minor

Notes
(0050575)
iperdomo   
2012-07-14 12:14   
We can improve the way we store the tickets. It's a JSON serialized version of the whole object, but it includes too much redundant information.

8KB for an order with 10 lines is too much. See the attached file (order.json)