Fix gh-2836 - buildindex var row,col_prefix fix

Building an index with COMPRESS(FIRST) and variable rows, caused excessive
amounts of memory to be used when reading the index. Because, the when the
nodes were unpacked, the max length * numRows was allocated and retained per
expanded node.

This commit encodes the row lengths in the compressed format

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
minor changes

rename a couple of local vars for clarity
common up a couple of memcpy's for efficiency

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Fix gh-2989, more null ptr
Merge pull request #3004 from rengolin/esp

Fix gh-2989, more null ptr

Reviewed-By: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Fix gh-2955 Spaces not trimmed from workunit id

Searching for a workunit with an id that ends in a space
leads to an internal error. This fix trims both left spaces
and right spaces of a workunit id input for all of the
methods in ws_workunit. This fix also checks the format
of the id and, if the id contains invalid characters,
displays an error: 'Invalid Workunit ID'.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Fix gh-2849 Move Total Thor Time to end of Timings

In EclWatch workunit details under Timings, "Total thor time"
is sometimes difficult to find because it is in the middle of
all the timings instead of being on the end. Having it on the
end would make it easier to find.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Add COMPRESSED(FIRST) and COMPRESSED(ROW) tests
Merge pull request #2870 from jakesmith/col_prefix-fix

Fix gh-2836 - buildindex var row,col_prefix fix

Reviewed-By: Renato Golin <rengolin@hpccsystems.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #3012 from wangkx/gh2849

Fix gh-2849 Move Total Thor Time to end of Timings

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2988 from wangkx/gh2955

Fix gh-2955 Spaces not trimmed from workunit id

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Reducing eclcc memory consumption

* Use template classes for implementing the linkcounts.
  This avoids having an extra VMT for CInterface - it can reuse the
  vmt of the interface.

* Change attributes so they are stored as linked list of entries
  instead of an array.  Reduces size if an expression has no attributes
  and allows firther changes later.

* Don't create an extra attribute for unadorned attribute

* Simplify format of serialized form

* Use an attribute to store location independent expression

* Optimize the representation of referenced tables
  Reduce from 24 bytes to 12 bytes in 32bit, 32 to 16 in 64bit
  Optimize the storage of a single table

* Clean up symbol code

* Improve statistics for opcode counts

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Change a few more common classes to use CInterfaceOf

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>

A
H
re
eclcc memory savings - move type field

Rather more drastic than some of the other changes, but
CHqlConstant, CHqlAnnotation and CHqlSelectExpr don't need to store
the type field.  Since they make up quite a large proportion of the
expressions (especially with upcoming change) it is worth removeing
them.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Optimize some representations of no_select

The vast majority of the no_select expressions are stored
as the normalized form.  Using a different calss for these saves
8 bytes for a common case.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Move usedTables to a separate base class

Although this is complicating the inheritance structure, it allows constants
annotations and selects to lose 16bytes (12 in 32bit).

It is possible caching isSelectRootAndActive in a flag variable would
slighlty speed up the derived code in the select base.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
eclcc memory - more savings

Add a comment to the CHqlExpression base classes that have been introduced.

Use CInterfaceOf<IAtom> for implementing atoms

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>