From: Mark G. <mg...@us...> - 2005-08-30 00:02:22
|
Update of /cvsroot/gmod/apollo/src/java/apollo/gui/drawable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14052/src/java/apollo/gui/drawable Modified Files: DrawableFeatureSet.java Log Message: loading a dataset from bdgp was incredibly slow in apollo - it was taking 4 minutes! - turns out this dataset had a huge amount of features in one tier ~7000 - in drawableFeatureSet.addFeatureDrawable findDrawable was being called - for eveyry feature added - and findDrawable iterates through every drawable in the set to make sure its not already there - for large sets this is extremely costly. i added this a few months ago to deal with splits adding the same feature twice - this is not the way to address this issue (at the time i thought it a nice check to have - little did i know the bottleneck i added) - so i took out the offending code and the 4 minute load went down to 26 seconds - steve searle noticed this problem as well and took out for in the non-editing case - but really it needs to be taken out for all cases as one might be editing on very large datasets as is currently the case. also put in non-analysis check for gene query. Index: DrawableFeatureSet.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/gui/drawable/DrawableFeatureSet.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** DrawableFeatureSet.java 24 Aug 2005 13:56:43 -0000 1.70 --- DrawableFeatureSet.java 30 Aug 2005 00:02:05 -0000 1.71 *************** *** 99,103 **** this may be ammended in the future. But anyways theres no reason a set should have the same child twice (at least that i can think of) so its not an ! unreasonable restriction to enforce. */ public Drawable addFeatureDrawable(SeqFeatureI sf) { // check if have drawable for sf --- 99,107 ---- this may be ammended in the future. But anyways theres no reason a set should have the same child twice (at least that i can think of) so its not an ! unreasonable restriction to enforce. ! the findDrawable really slows things down - especially noticeable for large datasets ! so this should be fixed up stream in the split not here - taking it out - ! another alternative would be to have 2 separate methods (or a flag) since the split ! problem comes from repairFeatSet i think */ public Drawable addFeatureDrawable(SeqFeatureI sf) { // check if have drawable for sf *************** *** 105,113 **** // SMJS Added condition round this - model not likely to change if editing not enabled // and this should save a huge number of cycles ! if (Config.isEditingEnabled()) { ! Drawable existingChild = findDrawable(sf); ! if (existingChild != null) ! return existingChild; ! } Drawable dsf = createDrawable(sf); --- 109,118 ---- // SMJS Added condition round this - model not likely to change if editing not enabled // and this should save a huge number of cycles ! // yes - take this out for all cases - fix the editing problem elsewhere ! // if (Config.isEditingEnabled()) { ! // Drawable existingChild = findDrawable(sf); ! // if (existingChild != null) ! // return existingChild; ! // } Drawable dsf = createDrawable(sf); |