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

Partial solution to slow startup (mc-4.7.0-pre4) #1781

Closed
mc-butler opened this issue Nov 1, 2009 · 21 comments
Closed

Partial solution to slow startup (mc-4.7.0-pre4) #1781

mc-butler opened this issue Nov 1, 2009 · 21 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: high Serious problem that could block progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/1781
Reporter 0xe2.0x9a.0x9b (0xe2.0x9a.0x9b@….com)
Keywords startup time, UTF8, strcmp

This is a patch to improve the startup time of mc-4.7.0-pre4. Please incorporate it into the mainline sources.

Statistics:

  • startup time without the patch: 0m0.413s
  • startup time with the patch: 0m0.073s

Further improvements can be achieved by optimizing the usage of the glib function involved in UTF8 string comparisons.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by 0xe2.0x9a.0x9b (0xe2.0x9a.0x9b@….com) on Nov 1, 2009 at 16:56 UTC

@mc-butler
Copy link
Author

Changed by 0xe2.0x9a.0x9b (0xe2.0x9a.0x9b@….com) on Nov 3, 2009 at 11:40 UTC (comment 1)

  • Priority changed from minor to major

To MC developers: The least you can do is to write back whether you are going to apply the patch or not ...

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 3, 2009 at 13:00 UTC (comment 1.2)

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from 4.7 to 4.7.0

Replying to 0xe2.0x9a.0x9b:

To MC developers: The least you can do is to write back whether you are going to apply the patch or not ...

Yes. Thank you very much!

But patch would be cleaned up for type accuracy:

  • use gboolean instead of int for boolean variables;
  • use size_t instead of int for array sizes.

I'll make it myself and create a branch ASAP.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 3, 2009 at 16:45 UTC (comment 3)

Created 1781_slow_startup branch. Parent branch is master.
[338829a05ea6d6d8d3680a08e41ec53385dc576a]

@mc-butler
Copy link
Author

Changed by 0xe2.0x9a.0x9b (0xe2.0x9a.0x9b@….com) on Nov 3, 2009 at 21:15 UTC (comment 4)

OK. I wasn't sure whether you are working on some other solution to this problem.

Thanks for the final code cleanup. Though, if I was a purist I would point out that MC's source code is using an "int" for doing iterations such as "for(i=..." ...

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Nov 3, 2009 at 22:01 UTC (comment 5)

We planned to use HASH's to make faster algorithm. but not now...

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Nov 3, 2009 at 22:05 UTC (comment 6)

to ⚛: and thank you for your time.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 11, 2009 at 11:17 UTC (comment 7)

  • Severity changed from no branch to on review

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Nov 11, 2009 at 11:45 UTC (comment 8)

  • Votes set to slavazanko

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Nov 18, 2009 at 10:47 UTC (comment 9)

  • Votes changed from slavazanko to slavazanko angel_il
  • Severity changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 18, 2009 at 11:18 UTC (comment 10)

  • Resolution set to fixed
  • Votes changed from slavazanko angel_il to commited-master
  • Status changed from accepted to testing
  • Severity changed from approved to merged

Merged to master.
[15a21a7]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 18, 2009 at 11:19 UTC (comment 11)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 24, 2009 at 10:34 UTC (comment 12)

  • Status changed from closed to reopened
  • Votes commited-master deleted
  • Resolution fixed deleted
  • Severity changed from merged to on review
  • Version changed from 4.7.0-pre4 to master

Little ptimization:

  • Inline of Keys sort functions.
  • Reimplemented key_name_conv_tab_sorted array as array of pointers instead of entire copy of key_name_conv_tab array.

Branch: 1781_little_startup_speedup. Parent branch: master.
[e6851b1]

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Nov 24, 2009 at 10:36 UTC (comment 13)

  • Votes set to slavazanko

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Nov 24, 2009 at 10:37 UTC (comment 14)

  • Severity changed from on review to approved
  • Votes changed from slavazanko to slavazanko iNode

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 24, 2009 at 10:42 UTC (comment 15)

  • Resolution set to fixed
  • Severity changed from approved to merged
  • Votes changed from slavazanko iNode to commited-master
  • Status changed from reopened to closed

Merged to master.
[e6851b1]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 1, 2009 at 18:29 UTC (comment 16)

  • Priority changed from major to critical
  • Type changed from enhancement to defect
  • Resolution fixed deleted
  • Votes commited-master deleted
  • Severity changed from merged to on review
  • Status changed from closed to reopened

[e6851b1] contains the following bug: array index is out of range in sort_key_name_conv_tab() function.

[1eb149deab750efc0a5f40971c3ff63d6f5fac69] fixes this bug.
Branch: 1781_out_of_bounds. Parent branch: master.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Dec 1, 2009 at 18:31 UTC (comment 17)

  • Votes set to zaytsev

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Dec 1, 2009 at 20:49 UTC (comment 18)

  • Votes changed from zaytsev to zaytsev angel_il

@mc-butler
Copy link
Author

Changed by styx (@styx) on Dec 2, 2009 at 6:48 UTC (comment 19)

  • Votes changed from zaytsev angel_il to zaytsev angel_il styx
  • Severity changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Dec 2, 2009 at 6:55 UTC (comment 20)

  • Severity changed from approved to merged
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Votes changed from zaytsev angel_il styx to commited-master

Merged to master.
[9229138]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: high Serious problem that could block progress
Development

No branches or pull requests

2 participants