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

Adds Promises to getOperatorList #4770

Merged
merged 2 commits into from
May 19, 2014

Conversation

yurydelendik
Copy link
Contributor

During active scrolling only one page can be parsed. This PR:

  • For future, allows suspend parsing at any moment of getOperatorList or getTextContent;
  • Gives 20ms time slot for those operations.

This allows parsing and display several pages at once (see https://gist.github.com/yurydelendik/513e6d9592fc4fd3a520)

This might help change people's perception of the performance when they actively scrolling.


for (var i = 0; i < gsState.length; i++) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a bug here in the master code

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree; the new code looks good.

@yurydelendik
Copy link
Contributor Author

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/765ee3f21bda9af/output.txt

@Snuffleupagus
Copy link
Collaborator

This seems like a great idea!
I'll try to look through the code during the weekend; it doesn't look too daunting when the ?w=1 URL flag is used :-)

var patternName = args[args.length - 1];
// SCN/scn applies patterns along with normal colors
var pattern;
if (isName(patternName) &&
(pattern = patterns.get(patternName.name))) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the indentation is off.

@yurydelendik yurydelendik changed the title [WIP] Adds Promises to getOperatorList Adds Promises to getOperatorList May 17, 2014
@yurydelendik
Copy link
Contributor Author

/botio test

ready for review

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

Live output at: http://107.21.233.14:8877/5bdcb198a36ae52/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

Live output at: http://107.22.172.223:8877/d2c20ea3a3782ed/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/d2c20ea3a3782ed/output.txt

Total script time: 24.96 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@Snuffleupagus Snuffleupagus self-assigned this May 17, 2014
@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/5bdcb198a36ae52/output.txt

Total script time: 26.93 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

Snuffleupagus added a commit that referenced this pull request May 19, 2014
@Snuffleupagus Snuffleupagus merged commit 7079992 into mozilla:master May 19, 2014
@Snuffleupagus
Copy link
Collaborator

Looks really good, thanks for the patch!

@YSYoon
Copy link

YSYoon commented May 20, 2014

I think this patch made great difference for my problematic PDF file in #4627
thank you!

@yurydelendik yurydelendik deleted the promise-operationlist branch May 20, 2014 02:49
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