Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25238

Android: View with a border can cause a significant performance deficit

    Details

    • Story Points:
      8
    • Sprint:
      2017 Sprint 18 SDK, 2017 Sprint 19 SDK, 2017 Sprint 20 SDK

      Description

      • A view with a border containing another view with a border will re-draw on every frame, causing significant UI performance hit.

      TEST CASE

      var win = Ti.UI.createWindow({backgroundColor: 'gray'}),
          list = Ti.UI.createListView({
              templates: {
                  template: {
                      childTemplates: [
                          {
                              type: 'Ti.UI.View',
                              properties: {
                                  left: 5,
                                  right: 5,
                                  top: 5,
                                  backgroundColor: 'blue',
                                  height: 90,
                                  bottom: 5,
                                  borderColor: 'orange',
                                  borderRadius: 10,
                                  borderWidth: 5
                              },
                              childTemplates: [
                                  {
                                      type: 'Ti.UI.View',
                                      bindId: 'item',
                                      properties: {
                                          left: 10,
                                          right: 10,
                                          height: 30,
                                          backgroundColor: 'red',
                                          borderColor: 'purple',
                                          borderRadius: 5,
                                          borderWidth: 3
                                      }
                                  }
                              ]
                          }
                      ]
                  }
              },
              defaultItemTemplate: 'template'
          }),
          section = Ti.UI.createListSection(),
          items = [];
       
      for (var i = 0; i < 48; i++) {
          items.push({
              item: {
                  width: '50%'
              }
          });
      }
       
      section.setItems(items);
      list.setSections([section]);
       
      win.add(list);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gmathews Gary Mathews
              Reviewer:
              Yordan Banev
              Tester:
              Lokesh Choudhary
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-11108
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code