[ Nexacro-튜닝포인트 ]

 

1. Hashmap 사용하기

    - 이유 : ds_nam.findRow(); - 자료가 많을 경우 경우 속도가 느려짐

    - 방법 :

         선언    : this.oDetailColIdx = {};

         값 Set : this.oDetailColIdx[pk컬럼1값 + ',' + pk컬럼2값] = row;   - 즉 pk를 key로 잡고, row를 set한다.

 

2. array_name.reduce

 

3. alasql

   - https://github.com/agershun/alasql

   - https://raw.githubusercontent.com/wiki/agershun/alasql/Similar-Projects.md

 

3. javascript용 excel

    - https://github.com/agershun/alax

    - node.js 용 excel

      .  https://todactodac.blogspot.kr/2016/06/nodejs-excel4node-node-excel.html?view=flipcard#!/2016/06/nodejs-excel4node-node-excel.html

      . https://talesofthefluxfox.com/2016/10/07/writing-to-xlsx-spreadsheets-in-node-js/

 

4. grid.enableRedraw 보단  grid.refreshBody(false)가 속도가 빠름.

 

5. makeRowIndex

    setGdmiColumn

    getGdmiColumn

    typeof

    viewRecord

 

6. dataset prototype 구현

    - set, get이 잘 안됨. 이유가 뭘까?

6.1 prototype 정의

this.calculatorInitSet = function(){
 var _pDataset = nexacro.Dataset.prototype;
 
 if(!_pDataset.setGdmiColumn) {
  _pDataset.setGdmiColumn = function(nRow, sCol, val) {
  
   try{
    this._rawRecords[nRow][sCol] = val;
    this._rawRecords[nRow][sCol].hi = val;
   }
   catch(e){}
  };
 }
 
 if(!_pDataset.getGdmiColumn) {
  _pDataset.getGdmiColumn = function(nRow, sCol) {
  
   try{
    return this._rawRecords[nRow][sCol];  -- _rawRecords :getColumn()함수보다 빠른 nexa 내부 함수
   }
   catch(e){}
  };
 }
 
 if(!_pDataset.getViewGdmiColumn) {
  _pDataset.getViewGdmiColumn = function(nRow, sCol) {
  
   try{
    return this._viewRecords[nRow][sCol];
   }
   catch(e){}
  };
 }
};

 

6.2 prototype 사용하도록 호출

      this.calculatorInitSet();

6.3 prototype 사용

      this.ds_name.getGdmiColumn(row, 'colid');

      this.ds_name.setGdmiColumn(row, 'colid', '값');

'Nexacro-이론 및 튜닝 > 기본문법' 카테고리의 다른 글

Nexacro-Null  (0) 2017.02.13
Nexacro - Array.초기화  (0) 2017.01.31
Nexacro 문법 - do while  (0) 2017.01.22
Nexacro 기본문법.Array2  (0) 2017.01.22
Nexacro 기본문법 - Array  (0) 2017.01.22
Posted by 농부지기
,