forked from ifsnop/mysqldump-php
-
Notifications
You must be signed in to change notification settings - Fork 6
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
1.1.0 features #38
Merged
Merged
1.1.0 features #38
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0fac1bd
Inline escape() method to improve performance
staabm 7563fab
Remove unnecessary call_user_func() to be faster
staabm c003fb9
Faster dump by less tiny writes()
staabm c15b5b8
move isEnabled() call out of hot loop
staabm 2fe1492
simplify
staabm 178d8c6
Merge branch 'fast-invoke' of github.com:staabm/mysqldump-php into 1.…
back-2-95 9165606
Merge branch 'less-writes' of github.com:staabm/mysqldump-php into 1.…
back-2-95 847dec0
Trigger the dump info hook when max buffer length is reached
guvra 00c193e
micro-optimize / improve readability
staabm 9795f14
Fix typo
staabm 2ececab
Merge branch 'inline3' of github.com:staabm/mysqldump-php into 1.1.0-…
back-2-95 6e7314b
Merge branch '1.1.0-features' of github.com:guvra/mysqldump-php into …
back-2-95 ca955c5
Merge branch 'patch-3' of github.com:staabm/mysqldump-php into 1.1.0-…
back-2-95 4ec89ac
Revert "Fix typo"
back-2-95 4725eaa
Merge branch 'main' of github.com:druidfi/mysqldump-php into 1.1.0-fe…
back-2-95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
since we are buffering rows into batches with this PR, it might make sense to emit a event at this point in time, so a possible progress indicator could also update when a table dump is in-flight.
otherwise dumping huge tables will not see any progress updates for - in our case - 20-30 minutes.
see also #39
I would propose something like
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.
Another call before the foreach loop is also needed, otherwise the dump info will display an incorrect table name until the 1st million characters were processed.
Also maybe adding a state instead of rowProgress, e.g.:
Before the start of the foreach:
['name' => $tableName, 'completed' => false, 'rowCount' => 0]
Within the foreach loop:
['name' => $tableName, 'completed' => false, 'rowCount' => $count]
After the foreach loop:
['name' => $tableName, 'completed' => true, 'rowCount' => $count]
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.
valid points. I like your idea more than mine