Improved performance on speed. Refs #8685.

1. Removed log in debug level in loop.
2. Reduced access to a huge vector.
3. Refactored the operation on DateAndTime and time_duration for speed.
Merge branch 'feature/8685_matrixws_filter' into develop