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

Android: ImageView image download performance slow if HTTP response error occurs as of 10.1.0

    Details

    • Story Points:
      7
    • Sprint:
      2021 Sprint 20

      Description

      Using the ListView test code from https://jira.appcelerator.org/browse/TIMOB-28439

      const imageUrls = [
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZiZwrzbILezlrhxlrIWwrzbILOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlriZhxhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/zbwrILQBiZiZILwrwrwrwrwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/zbwrILQBiZiZlrwrwrwrwrwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWIWlrezQBQBiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWzbzbOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWQBJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxILwrhxiZQBILIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrwrJwiZlrzbiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZILILIWhxhxQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezQBiZQBJwIWIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwreziZILQBwrJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezlriZQBiZzbIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezwrQBQBezwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezwrQBQBiZhxILOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezwrQBQBiZILwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwIWzbhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWiZlrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwezQBiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwezwrIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwiZlrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBzbzbwrhxwrJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwreziZILQBQBzbOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWwrhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwreziZILQBzblrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlrezwrQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlriZILQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlriZlrJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwhxlrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwILzbOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwezQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwJwhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBwrhxzbhxJwezOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBlriZILQBwrlrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBwrhxzbhxhxJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWIWwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/zbwrJwlrIWhxQBwrwrwrwrwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/iZzbJwILlrhxJwzbQBiZlriZiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/iZzbJwILlrhxJwzbQBiZlrzbIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/iZzbJwILlrhxezlriZQBILiZlrOqQB.jpg"
      ];
      function createListViewSectionItems() {
      	const items = [];
      	for (let index = 1; index <= 1000; index++) {
      		items.push({ properties: {
      			title: "Row " + index,
      			image: imageUrls[index % imageUrls.length],
      		}});
      	}
      	return items;
      }
      const window = Ti.UI.createWindow();
      window.add(Ti.UI.createListView({
      	sections: [Ti.UI.createListSection({
      		headerTitle: "ListView",
      		items: createListViewSectionItems(),
      	})],
      }));
      window.open();
      

      you can see a real difference between scrolling in 10.0.2.GA and 10.1.0.RC. It seems to freeze the UI when its processing or loading the images. The Received unexpected response code 415 from errors are in both SDKs but 10.0.2.GA is still very smooth while the everything is freezing in 10.1.0.RC

      Changing it to use a scrollview with imageviews:

      const imageUrls = [
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZiZwrzbILezlrhxlrIWwrzbILOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlriZhxhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/zbwrILQBiZiZILwrwrwrwrwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/zbwrILQBiZiZlrwrwrwrwrwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWIWlrezQBQBiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWzbzbOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWQBJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxILwrhxiZQBILIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrwrJwiZlrzbiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZILILIWhxhxQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezQBiZQBJwIWIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwreziZILQBwrJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezlriZQBiZzbIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezwrQBQBezwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezwrQBQBiZhxILOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezwrQBQBiZILwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwIWzbhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWiZlrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwezQBiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwezwrIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxiZQBQBJwiZlrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBzbzbwrhxwrJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwreziZILQBQBzbOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWwrhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwreziZILQBzblrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlrezwrQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlriZILQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxIWzbhxlriZlrJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwhxlrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwILzbOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwezQBOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxezJwezILJwJwhxOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBwrhxzbhxJwezOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBlriZILQBwrlrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxQBwrhxzbhxhxJwOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R20/iZzbJwILlrhxwrezIWwrIWIWwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/zbwrJwlrIWhxQBwrwrwrwrwrwrOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/iZzbJwILlrhxJwzbQBiZlriZiZOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/iZzbJwILlrhxJwzbQBiZlrzbIWOqQB.jpg",
      	"https://www20.cora.fr/media/produit/1616997608/400/R25/iZzbJwILlrhxezlriZQBILiZlrOqQB.jpg"
      ];
       
      const window = Ti.UI.createWindow();
      const scroll = Ti.UI.createScrollView({
      	width: "100%",
      	height: "100%",
      	layout:"vertical"
      })
       
      for (let index = 1; index <= 1000; index++) {
      	var imageView = Ti.UI.createImageView({
      		width: 100,
      		height: 100,
      		image: imageUrls[index % imageUrls.length]
      	})
      	scroll.add(imageView);
      }
       
      window.add(scroll)
      window.open();
      

      it does timeout while opening the app with 10.1.0.RC. After I click "wait" I can use the app but 10.0.2.GA starts quicker and doesn't run into the "app not responding" timeout.

      SDK: 10.1.0.RC
      Android: 11 (Pixel 4)

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              michael Michael Gangolf
              Reviewer:
              Gary Mathews
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration