mirror of
https://github.com/bringout/oca-ocb-report.git
synced 2026-04-24 04:22:08 +02:00
19.0 vanilla
This commit is contained in:
parent
62d197ac8b
commit
184bb0e321
667 changed files with 691406 additions and 239886 deletions
|
|
@ -0,0 +1,21 @@
|
|||
import { __debug__ } from "@odoo/hoot";
|
||||
import { stores } from "@odoo/o-spreadsheet";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
const { RendererStore } = stores;
|
||||
|
||||
/**
|
||||
* When rendering a spreadsheet, drawing the grid in a canvas is a costly operation,
|
||||
* perhaps the most costly operation. This patch allows to skip the grid/canvas drawing
|
||||
* in standard tests, which speeds up the overall execution.
|
||||
*
|
||||
* For debugging urpose, the patch is ineffective when running tests in debug mode
|
||||
* and the grid is drawn as usual.
|
||||
*/
|
||||
patch(RendererStore.prototype, {
|
||||
drawLayer(ctx, layer) {
|
||||
if (__debug__.debug) {
|
||||
return super.drawLayer(ctx, layer);
|
||||
}
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue