scala-ide / scala-search

Next Scala Search Engine
6 stars 10 forks source link

Issue/check index 112 #113

Closed dragos closed 8 years ago

dragos commented 8 years ago

Fix #112.

dragos commented 8 years ago

@andrey-ilinykh if you want to take a look.. .seems like you're interested in the project /cc @mads379 @sschaef

ghprb-bot commented 8 years ago

Refer to this link for build results (access rights to CI server needed):

https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-search-validator/61/ https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-search-for-ide-master-2.11.x/63/

ghprb-bot commented 8 years ago

Refer to this link for build results (access rights to CI server needed):

https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-search-validator/63/ https://jenkins.scala-ide.org:8496/jenkins/job/ghprb-scala-search-for-ide-master-2.11.x/65/

kiritsuku commented 8 years ago

Definitely a big improvement. The right solution though would be to incrementally reindex the project. This project close & reopen can only be used because scala-search right now doesn't support a lot of features.

dragos commented 8 years ago

In normal use, it indexes it incrementally. Only if the index is corrupt, it deletes it and recreates it (but won't do it on every project close/open, only if the index is corrupt). At least, that's how I understand it :)

wpopielarski commented 8 years ago

Just a tangent, I'm really surprised with your easiness of jumping from one project to another doesn't matter it is scala-ide, scala-refactoring, scala-scala and now scala-search. The level of proficiency rather unavailable for me :)

kiritsuku commented 8 years ago

On 03/02/2016 09:42 AM, Iulian Dragos wrote:

In normal use, it indexes it incrementally. Only if the index is corrupt, it deletes it and recreates it (but won't do it on every project close/open, only if the index is corrupt). At least, that's how I understand it :)

Indeed, it is doing incremental updates right after the point where it recreated the entire index. I did some logging and it turned out that the problem is not that the entire index is recreated but that the check happens way too often. Every few 100ms the job is run, whereas it should only run when the user changed a file. But I don't understand why there is a rebuild index from scratch functionality in the job in the first place because the incremental index logic can not only add but also remove data. Maybe it is just an oversight that this logic is in this place. What we actually want to have is a new index the moment someone cleans the project, don't know if it is already happening in this case.

kiritsuku commented 8 years ago

On 03/02/2016 09:51 AM, Wiesław Popielarski wrote:

Just a tangent, I'm really surprised with your easiness of jumping from one project to another doesn't matter it is scala-ide, scala-refactoring, scala-scala and now scala-search. The level of proficiency rather unavailable for me :)

Don't worry, you will get there too. Just keep learning. ;)