Page MenuHomePhabricator

edje_calc: Exception handling if no calculation is required.
ClosedPublic

Authored by CHAN on Tue, Nov 5, 10:49 PM.

Details

Summary

If there is no object swllowed, do not run part_calc on it.
This swallow will be calculated if there is an associated part, otherwise it will not need to be calculated.

When the app is launched, a lot of edje calculation logic is executed.
Most of the edje size is missing, so the calculation result is meaningless.
Added code to prevent this.

Test Plan

elementary_test

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
CHAN created this revision.Tue, Nov 5, 10:49 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

CHAN requested review of this revision.Tue, Nov 5, 10:49 PM
CHAN edited the summary of this revision. (Show Details)Tue, Nov 5, 10:52 PM
CHAN edited the test plan for this revision. (Show Details)
CHAN added reviewers: raster, cedric, Hermet, smohanty, eagleeye.
CHAN added a comment.EditedTue, Nov 5, 10:57 PM

There may be multiple exception cases, and this patch may look incorrect because of logic s what I'm not familiar with.

Please let me know and i will fix the patch for additional cases.

edje_part_recalc called around 40,000 times when elementary_test launched.
after this patch it reduce to around 30,000

elementary_test main function takes a little time after this patch. (using ecore_time_get())

before start = 77166.514262 end = 77166.866415 gap = 0.352152
after start = 77126.315745 end = 77126.627547 gap = 0.311802

cedric added a comment.Wed, Nov 6, 9:20 AM

Could you report the result of running various "ELM_FIRST_FRAME=T elementary_test -to " examples to get a better idea of how this improve things.

cedric requested changes to this revision.Wed, Nov 6, 9:21 AM
This revision now requires changes to proceed.Wed, Nov 6, 9:21 AM
CHAN added a comment.Thu, Nov 7, 1:04 AM

The result of "ELM_FIRST_FRAME=T elementary_test " is below.

Without this patch.

Startup time: '1573117072.206075' - '1573117071.777165' = '0.428910' sec
Startup time: '1573117074.454783' - '1573117073.994186' = '0.460597' sec
Startup time: '1573117076.165429' - '1573117075.746091' = '0.419338' sec
Startup time: '1573117077.679230' - '1573117077.243596' = '0.435634' sec
Startup time: '1573117079.015538' - '1573117078.593599' = '0.421939' sec

With this patch

Startup time: '1573116990.330059' - '1573116989.956458' = '0.373601' sec
Startup time: '1573116994.098765' - '1573116993.736804' = '0.361961' sec
Startup time: '1573116996.204540' - '1573116995.822190' = '0.382350' sec
Startup time: '1573116997.921425' - '1573116997.557631' = '0.363794' sec
Startup time: '1573116999.483453' - '1573116999.106383' = '0.377070' sec

cedric added a comment.Thu, Nov 7, 7:37 AM

That looks quite nice. Will run a few test this morning with it.

cedric added a comment.Thu, Nov 7, 9:57 AM

Hum, it doesn't pass efl test suite. I am guessing the reason is that we do not initialize the part text content anymore until the object is resized. Not to sure what the right strategy is, maybe doing a pass when the geometry is 0x0 only on TEXT and TEXTBLOCK part to just set the proper text on them. It would add a lot of jump and bypass code around. If you take that road, please avoid duplicating code.

CHAN added a comment.Fri, Nov 8, 12:54 AM

Oops i didn't check upstream efl-test-suite.
I checked efl-test-suite on tizen. it passed all test cases so i made a commit.

anyway, i will check test cases on upstream. thank you.

CHAN updated this revision to Diff 26879.Wed, Nov 13, 9:11 PM

Fixed can't get textblock's text when edje has no size.

CHAN updated this revision to Diff 26880.Wed, Nov 13, 9:14 PM

Code clean up.

CHAN updated this revision to Diff 26881.Wed, Nov 13, 9:16 PM

Code clean up.

cedric accepted this revision.Thu, Nov 14, 10:08 AM

Great.

This revision is now accepted and ready to land.Thu, Nov 14, 10:08 AM
Closed by commit rEFL37b55172b0d4: edje_calc: Exception handling if no calculation is required. (authored by Woochanlee <wc0917.lee@samsung.com>, committed by cedric). · Explain WhyThu, Nov 14, 10:09 AM
This revision was automatically updated to reflect the committed changes.