This is causing a number of delays on tests when there are 150+ projects
Will become an issue as more projects are added, and it is making some tests unstable in wallaby (which seems to have more of a problem vs mocha)
Here is the test that replicates the problem
require 'fluentnode'
it.only 'Performance issue on multiple Data_Project methods #167', ->
start = Date.now()
using new Data_Project(), ->
@.projects()._keys().size().assert_Is 2 # there are 2 projects
(Date.now() - start).assert_Smaller_Than 3 # @.projects() is sub 3 ms
for i in [1..10] # call @.project_Files 10 times
@.project_Files('bsimm')[0].size().assert_In_Between 140,160 # there are about 150 projects
(Date.now() - start).assert_In_Between 250,500 # 10x @.project_Files() takes more than 250ms
# this becomes a problem for actions like
# calculate scores which will call @.project_Files
# once per project (i.e. 150+ times)```
Note how @wallabyjs is 3x slower than mocha
Similar problem has occurred in the past (see #108 and #72)
This is causing a number of delays on tests when there are 150+ projects
Will become an issue as more projects are added, and it is making some tests unstable in wallaby (which seems to have more of a problem vs mocha)
Here is the test that replicates the problem
Note how @wallabyjs is 3x slower than mocha
Similar problem has occurred in the past (see #108 and #72)