Skip to content
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

Performance improvement for GET_ROW method #529

Merged
merged 5 commits into from Mar 21, 2018

Conversation

bilencekic
Copy link
Contributor

@bilencekic bilencekic commented Mar 20, 2018

Issue #527 has been fixed after updating ZCL_EXCEL_ROWS class by removing object iterator and introducing hash table. ZCL_EXCEL_WORKSHEET->GET_ROW method has been updated accordingly based on new structure to read directly from hash table.
Before :
image

And after:
image

bilencekic and others added 4 commits March 20, 2018 09:32
Iterator is slowing down for read operations, row class reference is now stored in hash table rather than iterator.
Iterator logic removed and hash table logic inserted to the GET_ROW method.
@ivanfemia
Copy link
Collaborator

ivanfemia commented Mar 21, 2018

Thanks for your contribution
Do we still need the method GET_ITERATOR?

I would also suggest to have the DT_ROWS as protected, so no other class can change the content of the internal table.

@bilencekic
Copy link
Contributor Author

bilencekic commented Mar 21, 2018

@ivanfemia it is easier to add READ ONLY statement, in this case it will be public which is easy to access and can only be changed inside the class;

    DATA:
          DT_ROWS TYPE HASHED TABLE OF T_ROWS WITH UNIQUE KEY ROW_INDEX READ-ONLY.

Get iterator we don't need i think it only exists in worksheet class, it is safe to delete.
I can do above changes as well if you want.

@ivanfemia
Copy link
Collaborator

That's great!
thank you!

@ivanfemia ivanfemia merged commit cb102a7 into abap2xlsx:master Mar 21, 2018
@EMSINSANE
Copy link

Hi. Just ( 27.03.18 ) installed the Project.
Class ZCL_EXCEL_WORKSHEET contains Syntax-Errors because the deleted Method ZCL_EXCEL_ROWS->GET_ITERATOR() is used in ZCL_EXCEL_WORKSHEET->GET_ROWS_ITERATOR().

So Long

Insane

@ivanfemia
Copy link
Collaborator

@EMSINSANE can you try to remove ZCL_EXCEL_WORKSHEET->GET_ROWS_ITERATOR() it should not be used anywhere... I have no access to a NetWeaver server at the moment.
You can either commit the change to the repository or tell us that this fixed the issue.

Thank you
Ivan

@bilencekic bilencekic deleted the bilencekic-patch-1 branch March 27, 2018 14:59
@bilencekic bilencekic restored the bilencekic-patch-1 branch March 27, 2018 14:59
@larshp
Copy link
Member

larshp commented Mar 27, 2018

The syntax error:
image

GET_ROWS_ITERATOR() is used in the following places,
image

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.

None yet

4 participants