i want to choose to render formated text in uiwebviews in a scrollview with many pages. there will be up to 10 webviews with just text on one page. when viewing a page, the next and the view behaing are loaded. so when scrolling, there are three pages loaded at a time.
my question is: how's the performance when scrolling the scrollview with the webviews. will it lag? now i use three20 text views for the text and it works flawlessly.
because i don't have the time test the whole stuff with webviews, i just wanted to ask you, if you have any experience with a solution like this.
thanks in advance
In my experience , I have implement 4 UIWebview that load amount of XML data and convert to HTML with objective-c code , and use javascript to manage each pages with javascript that hide/show document.getelementbyId
so, It's quite good for me . I think the performance base on how internet connection speed ,your HTML layout arrangement complexity and managing content javascript.
Related
I want to show a scroll view that has fairly large number of thumbnails. eg: https://cdn.vox-cdn.com/thumbor/sddJ5KHoGDbZfx8jcNey4iahmu0=/0x0:1395x1171/1200x800/filters:focal(587x475:809x697)/cdn.vox-cdn.com/uploads/chorus_image/image/57064313/Screen_Shot_2015-09-07_at_9.11.34_AM.0.0.png
I want to load the view as fast as possible without delaying it until all images are loaded. This essentially means I need to lazy load image content. While each image is downloaded, a placeholder image (fetched locally) should be shown. I certainly know how to do this from scratch, but wanted to know if there are standard solutions available. Can I setup Xamarin.Forms.Image class to get this behavior?
Is there any particular reason for which you want to use a ScrollView specifically ?
From what you're describing, it looks like you should actually be working with a ListView instead (which will improve performance by a LOT if you have a large list of images).
Then, like #SushiHangover said, there is FFImageLoading that can help you work with these images, or you can create you own Image class, to implement a custom solution on both android and iOS.
Glide is a faily easy to use solution for Android, and SDWebImage is also a good solution for iOS.
My website for architectural visualization: http://www.greenshell3d.com
I noticed on the networking tab / incognito it takes 15 seconds or so to load the above-the-fold content. (most notably the image slideshow.)
Some of the images in the slideshow load at the very end instead of the beginning of the website load process. Now I understand the browser handles this order, but perhaps there is another way. As it stands, the bounce-rate is too high and I expect it is because of load time.
I've seen a jquery snippet on github that allows one to control the order of image loads - do you think this is a good option? I'd be glad to hear any opinions before investing the time to fix this.
Any ideas? Thanks!
You said you are interested in any opinions as well, so first some general thoughts: There is no page fold. The web that we produce content for exists in so many different screen sizes + resolutions that it’s impossible to say "The fold is below this big image!". Yes, Google changed the pagespeed insights tool to make people load stuff on top of the page first, but I think their wording there is really bad.
Now to your image loading issue:
The first thing I would recommend is to reduce the size of all the images. They seem to be around 280 - 300 kb per image and you have a few of them. Since there is a translucent overlay over them anyways you can probably get away with reducing the image quality without people noticing it (because they don’t see the image directly). Play around with the values here.
I would then look into optimizing the code for the slider to load the first image first, then the rest of the page and the other images asynchronously maybe after that. Another trick could be to increase the slide fade time from the first slide to other slides so the slider doesn’t change if the next image isn’t ready yet. You said you found a jQuery script to implement that, that’s where I’d start.
As a general guideline: the position of requests in the source code usually determines the load order of things on the page. If your images are requested by JavaScript at the end of the page, that lead to the images being loaded later than you want them to be loaded.
I'm trying many problems with the time loading of my web page:
www.alvaromillan.es.
I've tried to minify the js and the images but the problem is, as you can see, that my web site is only this page so every image and js is on this document...
The loading time is really high and even the smooth scrolling movement lasts a lot and the first time you use it it doesn´t go fine...
Please may any of you help me??
I took a quick look at the page just using the chrome developer tools and while there are probably several things you can do which YSlow would suggest, I think the biggest gain would come from optimizing and spriting your images. 131 of the 156 requests on your page are for images. Thats alot of images and many are fairly small. Also alot of the images seem quite large in bytes for their size. Here is what I would do:
Combine the images using several sprite sheets about 50k-100k per sheet.
Use the PNG format.
Quantize the sprite sheets to 8bit PNGs. My guess is that you will not experience perceptible quality loss by doing this. You could use spmething like pngquant to do this.
Use something like optipng to apply lossless compression on the quantized image.
I think this will yield dramatic improvements.
As skaffman suggests, do run yslow and/or google page speed test for more thorough suggestions. I also like using webpagetest.org which provides great metrics for optimizing pages.
Give the YSlow Firefox plugin a try. It will analyze the load times of your site and advise you the best course of action to take to fix it.
OK, here's some quick initial thoughts...
Flush the page after the head so that the browser can start downloading those resources sooner.
Remove the iframe
jquery appears to be loaded twice - once directly and once via google.load
Can you defer the loading of the javascript until later e.g. put it at the bottom of the page or load it asynchronously?
Rather than preloading the slideshow images - why not load them on demand when clicked on, or lazy load them after the page has finished load?
Also do you really want IE to emulate IE6???
I've been noticing quite a few websites including YouTube and http://video.yahoo.com/, amazon and Facebook are loading content above the fold and then once you scroll down the rest is loaded. I'm not sure if it's the rendering of the content that is being delayed or if its media such as images that are being fetched when you scroll down.
Does anyone know how it is being done or how I can implement something similar?
true. They use javascript ( or jquery) to load content on scroll.
Most of the time Images as they take the maximum time in a page load.
Well there are several jQuery Plugins available out there which help you to achieve the same.
One plugin example is >>>> jQuery Lazy Load inspired by YUI ImageLoader
Or google - something like this - "jquery + lazy load plugin"
hope that helps
Regards, J'Sinh
http://api.jquery.com/scroll/
using this event handler, you check the scroll position, compare it to the document height http://api.jquery.com/height/
and if scroll position compared to the height indicates that the user is at the bottom, or near the bottom, use ajax to get more content.
Sorry for such a general answer, it's just that this needs experimenting, and writing the code would take a little while. Maybe someone else would do it, but I will just stick to this.
I am a scriptmonkey working with a lot of graphic designers who know not a thing about the web.
Despite my objections I frequently find myself with problems such as a 100Kb background image, several textual items they have made into glossy images, and 3 separate lengthy FLVs loading into a page etc etc.
I would really like to define a stack to control the flow of items loading. Eg, render the background, then the HTML, then the page images, then load the FLVs.
I assume this exists and I have been searching badly.
Can anyone point me to good resources on this?
For the images you can use the load event of the images to know when they are done. So you can chain loading this way. Look this: https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-10878_11-5214317.html