Skip to content

Shared string table works! #76

Merged
merged 6 commits into from Apr 9, 2012

3 participants

@ochko
ochko commented Apr 3, 2012

Shared string table should be faster

@jurriaan

What is happening here?
Isn't it better/faster to use real hashes (String#hash / equivalents). Just appending a few strings seems very inefficient/hackish ;)

@jurriaan
Collaborator
jurriaan commented Apr 3, 2012

I think it's better to include new benchmarks which do not duplicate the rows

@randym
Owner
randym commented Apr 5, 2012

@ochko grab me tomorrow please. I need to understand what you are trying to do here.

@ochko
ochko commented Apr 6, 2012

Dealing with custom styles in shared string table is overhead.

Because there will be not so many custom styles in program generated sheets.

@ochko
ochko commented Apr 6, 2012

One of my sheets had over 50,000 string cells, but there is only 103 unique strings.

@jurriaan

Why not use cell.value.hash?

ochko replied Apr 6, 2012

That will be done implicitly when object is put in a hash.

Collaborator

That's true, but benchmarking shows inserting hashes is faster: https://gist.github.com/2318872
Which is weird :)

ochko replied Apr 6, 2012

Worth to know. It seems putting hash of object straight in hash key helps because maybe it cuts one step in internals of Hash.

Note: wrote without any reference into actual source code of Hash.

@ochko
ochko commented Apr 6, 2012

It'll be nice if someone can test this parial shared string table thing on other versions of Spreadsheet softwares.

I tested it on Latest version of MS Office and OpenOffice on Mac OS X.

@randym
Owner
randym commented Apr 9, 2012

Merging this - with the arrogance that we can fix it if anything goes wrong!

@randym randym closed this Apr 9, 2012
@randym randym reopened this Apr 9, 2012
@randym randym merged commit 8c14a68 into randym:master Apr 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.