Skip to content

Reuse auth tokens when possible#6

Open
gregates wants to merge 1 commit intojmthrower:masterfrom
pikimal:token-reuse
Open

Reuse auth tokens when possible#6
gregates wants to merge 1 commit intojmthrower:masterfrom
pikimal:token-reuse

Conversation

@gregates
Copy link

Performance gain.

Before

2.1.1 :108 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 8.336039
2.1.1 :109 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 7.08108
2.1.1 :110 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 6.573957
2.1.1 :111 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 6.051839
2.1.1 :112 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 6.527635

After

2.1.1 :006 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 4.002985
2.1.1 :007 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 4.895547
2.1.1 :008 > Benchmark.realtime { 10.times { GoogleCells::Spreadsheet.get("0Ap_IQ_MsilJCdDJlLTNFSEE0d3A0UElXV0stc29TQmc") } }
 => 4.216413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant