-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speedup: PrettyPrint, Render, and Parse #12
Conversation
0e98821
to
2487d24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. I found that the code coverage has been decreased (formerly was 100%), and the code is not formatted with the lasted gofmt -s
linter.
@xuri I believe I've addressed the formatting issue - and as far as I can tell the code coverage should now be at 100% (using |
1147763
to
8b2cfd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Sorry, the lint issues were not introduced in your changes, gofmt
uses tabs for indentation in the comments, could you help to fix it?
diff --git a/efp.go b/efp.go
index b9b2880..e62c3c1 100644
--- a/efp.go
+++ b/efp.go
@@ -108,9 +108,8 @@ type Token struct {
// Tokens directly maps the ordered list of tokens.
// Attributes:
//
-// items - Ordered list
-// index - Current position in the list
-//
+// items - Ordered list
+// index - Current position in the list
type Tokens struct {
Index int
Items []Token
efp.go
Outdated
@@ -224,14 +266,16 @@ func ExcelParser() Parser { | |||
|
|||
// getTokens return a token stream (list). | |||
func (ps *Parser) getTokens() Tokens { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed (lint by gofumpt -l -d -w ./
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, after upgrade the Excelize library's dependencies efp to the commit 8b2cfd9
, the unit test TestCalcCellValue
failed, we need to investigate the reason that caused the problem before merging this PR.
@xuri Good to know - I'll investigate to determine the cause of the failure. |
@xuri I believe issues should be addressed now - should I squash the commits on this branch down to one? As an aside, it's really great to see such an exhaustive set of tests in https://github.com/qax-os/excelize. I had my own set I was working with but that set is much more expansive. |
- Add 3 formula function errors - Add comments for the helper function - Define helper functions after constants, variables, and data types - Simplify data type declaration in the function parameters - Remove outdated URL links in the documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for your efforts. Much appreciated. I have made some changes based on your branch.
PR Details
Using strings.Builder and
[]rune|rune
instead ofstring
can dramatic reduce time, bytes, and allocations.Benchmark used:
Description
Related Issue
Motivation and Context
While using the library, it was discovered that the string -> []rune conversions were causing many allocations.
How Has This Been Tested
Types of changes
Token string
on the Parser structChecklist