lp:~fabien-morin/unifield-server/perf_no_check_active_product

Created by Fabien MORIN and last modified
Get this branch:
bzr branch lp:~fabien-morin/unifield-server/perf_no_check_active_product
Only Fabien MORIN can upload to this branch. If you are Fabien MORIN please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Fabien MORIN
Project:
Unifield Server
Status:
Development

Recent revisions

3871. By Fabien MORIN

US-1246 [IMP] desactivate _check_active_product for test purpose as this method
could be responsible of big perf degradation.

3870. By Fabien MORIN

US-1246 [IMP] reduce the number of request of this method by doing only one
more read instead of as many read as there is products.

This method is about 10 times faster when Product list is displayed.

3869. By Fabien MORIN

US-1246 [IMP] significant improvment of _shipped_rate method. Before it was
doing thousands or sql request each time the listbox of Purchases were
displayed (to display the progress bar), now the same job is done bug with only
4 reads.

I added the method _compute_qty_dict and _compute_qty_obj_dict that can handle
a dict as parameter, this avoid to look for information we already know and
save a lot of requests/time machine.

I added a XXX comment because I don't understand the purpose of some code (that
I deleted in the dict version.

A futur improvment could be to change all other call to _compute_qty and then
keep only the dict version.

3868. By Fabien MORIN

US-1246 [IMP] store all new_vals in a dict to be able to group the write
according to their vals to write.
Most of the write should be grouped by now.
[IMP] small change sync_client/orm.py: define a new variable to avoid calculate
multiple times the same list

3867. By Fabien MORIN

US-1246 [IMP] do not do any operation if there is no ids given

3866. By Fabien MORIN

US-1246 [FIX] price_unit is also part of the required fields.
"if not proc or not proc['sale_id']" condition was badly indented, making test
test_uf_2507 failing.
self._check_product_uom should be done only in fi not
context.get('import_in_progress', False)

3865. By Fabien MORIN

US-1246 [FIX] of course we need to write on id grouped_write, not line['id'].
And the vals we need to write are the original one (vals) not new_vals that may
be modified by each other lines.

3864. By Fabien MORIN

US-1246 [REVERT] the merge with ticket 1151 as it was failing tests. Wait for
this code to be tested separatly.

3863. By Fabien MORIN

US-1246 [FIX] last commit was made by mistake, revert it

3862. By Fabien MORIN

US-1246 [FIX] adding missing definition of the variable

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:unifield-server
This branch contains Public information 
Everyone can see this information.

Subscribers