AdamBien/lightfish — pull request #6 by rveldpau (2013-02-06 16:16:40+00:00)
Title: Parallel Data Collection

I have added an option to perform the data collection in parallel. While testing I was able to get quite substantial performance increases. The table below shows the speed increases I was able to achieve. I tested against a local server (on same host), and a remote server (through VPN to another city). I was also able to make some modifications that increase performance without enabling the parallel option.

```
Local Server Remote Server
Before Modifications 2200 ms 6500 ms
After Modifications (w/o Parallel) 1750 ms 4200 ms
After Modifications (w Parallel) 1200 ms 2000 ms
```

The option itself is available in Advanced Configuration under Experimental options. I have placed it under experimental options because it uses Fork/Join to run the data collection in parallel. This is against the EE specification, which does not allow you to create your own threads, but it does not appear that Glassfish 3.X has a good way of handling parallel processing. Also, in this case, the threads should not interfere with the EE server. The main concern regarding spawning your own threads (it seems) is that they will not belong to any transaction; however, since we are only gathering the data in parallel, I believe the concern to be minimal.