rem: var transaction = new BookmarkImportTransaction("import"); 
add: if (countAfter - countBefore > 1) gBkmkTxnSvc.startBatch(); 
context:   importBookmarksFromFile: function ()  {    ///transaction...    try {      const kFilePickerContractID = "@mozilla.org/filepicker;1";      const kFilePickerIID = Components.interfaces.nsIFilePicker;      const kFilePicker = Components.classes[kFilePickerContractID].createInstance(kFilePickerIID);          const kTitle = BookmarksUtils.getLocaleString("SelectImport");      kFilePicker.init(window, kTitle, kFilePickerIID["modeOpen"]);      kFilePicker.appendFilters(kFilePickerIID.filterHTML | kFilePickerIID.filterAll);      var fileName;      if (kFilePicker.show() != kFilePickerIID.returnCancel) {        fileName = kFilePicker.file.path;        if (!fileName) return;      }      else return;    }    catch (e) {      return;    }    rTarget = RDF.GetResource("NC:BookmarksRoot");    RDFC.Init(BMDS, rTarget);    var countBefore = parseInt(BookmarksUtils.getProperty(rTarget, gRDF_NS+"nextVal"));    var args = [{ property: gNC_NS+"URL", literal: fileName}];    this.doBookmarksCommand(rTarget, gNC_NS_CMD+"import", args);    var countAfter = parseInt(BookmarksUtils.getProperty(rTarget, gRDF_NS+"nextVal"));    var transaction = new BookmarkImportTransaction("import");    for (var index = countBefore; index < countAfter; index++) {      var nChildArc = RDFCU.IndexToOrdinalResource(index);      var rChild    = BMDS.GetTarget(rTarget, nChildArc, true);      transaction.item   .push(rChild);      transaction.parent .push(rTarget);      transaction.index  .push(index);    }    BMSVC.transactionManager.doTransaction(transaction);    BookmarksUtils.flushDataSource();  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b63d39c4e1a2a46f8806477e84548ce028e9554a/bookmarks.js/clean/browser/components/bookmarks/content/bookmarks.js