You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2017/12/22 17:27:01 UTC

[beam] 03/03: BEAM-3324 improve symtab memory usage

This is an automated email from the ASF dual-hosted git repository.

lcwik pushed a commit to branch go-sdk
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 03f96c6b664a861a233e5011363495087711afa7
Author: Bill Neubauer <wc...@google.com>
AuthorDate: Fri Dec 15 10:00:22 2017 -0800

    BEAM-3324 improve symtab memory usage
    
    Change the symbol table lookup to read from a file rather than
    loading the file into memory. This is a space/time tradeoff, but
    lookups can be cached so we can get good speed with a much lower
    memory footprint.
---
 sdks/go/pkg/beam/core/util/symtab/symtab.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sdks/go/pkg/beam/core/util/symtab/symtab.go b/sdks/go/pkg/beam/core/util/symtab/symtab.go
index 54ec579..0c631c4 100644
--- a/sdks/go/pkg/beam/core/util/symtab/symtab.go
+++ b/sdks/go/pkg/beam/core/util/symtab/symtab.go
@@ -37,6 +37,10 @@ func New(filename string) (*SymbolTable, error) {
 		return nil, err
 	}
 
+	// The interface contract for the xxx.NewFile() methods takes an
+	// io.ReaderAt which suggests the Reader needs to stay alive for the duration
+	// of the symbol table.
+
 	// First try ELF
 	ef, err := elf.NewFile(f)
 	if err == nil {

-- 
To stop receiving notification emails like this one, please contact
"commits@beam.apache.org" <co...@beam.apache.org>.