React native slow perfomance on calendars - performance

I have tried many open source RN Calendar components out there and all of them seem to have performance issues.
I built my own CalendarList with a simple grid layout using FlexBox inside a FlatList, and it also becomes unusable due to rendering Performance issues.
There are around 1200 Views (13 months shown x 85 views p/month ) components according to the Perf Monitor. It seems the Bridge gets jammed when updating the 1200
It seems the issue is that a calendar has around 300 components which RN can't update without jamming the JS thread.
Workarounds i tried:
Using setNativeProps to perform update.
Using getItemLayout for skipping FlatList measurements.
Caching components (Not react way of doing things)
Made all my components PureComponents which are faster.
Displaying a Placeholder waiting for the calendar to render (not pretty and still jams the UI)
I wonder how people use a calendar lists in React Native, as i can't make any perform fast.

Related

Nativescript and more complex UI

I have to create mobile application for both IOS and Android.
I'm interested in use NativeSript problem is that, UI is quite complex and I'm not sure if this framework will manage this.
For my work with Js and Java is not a problem and I already have back-end side ready.
Best Regards
Luke
NativeScript can do anything a native Java/ObjC app can do; you have full access to the actual native OS controls from inside JavaScript. And all controls that are created are actually the native controls; so if you create 20 Java/ObjC controls or 20 controls in NS, they are still all the exact same type of controls as far as the Android (or iOS) runtimes are concerned, all the screen rendering is done the exact same way since NativeScript creates Native controls.
Now as to complex UI's, I have several apps with fairly complex UI's, however one thing I do is I frequently start with a single UI screen and then once happy with it I take pieces that I can and have those pieces dynamically load in/out when they are needed to keep the UI as simple (light memory usage) as much as possible. The UI can handle complex screens, but by showing less items (and eliminating any hidden items from memory) the UI is way more responsive in any language.

MVC3 CkEditor performance rendering issue

I have an C# .Net MVC3 web app. We are utilizing the CkEditor control. We love the control, however we are having a performance issue with it. One of our pages displays a dynamic list of objects. For each row in the list we have two CkEditor text areas. The larger the list the slower our app is. A list of 72 rows takes over a minute and a half to lead. The rendered page has time tags at the beginning and end of the page. The time tags show the page takes 2 seconds to create. The rest of the time is spent on the client rendering the page. The performance degradation is directly proportional to the number of CkEditor controls on a page.
Any ideas? Are we, in our code, loading a framework more than we need to, going out to the web for properties of each control?
The original developer is no longer and I am a novice with CkEditor.
I found an answer. It's not great news, but it's an answer. IE is the culprit. Firefox loads the identical URL's 6 to 7 times faster. The attached article from CkEditor support is what clued me in
CkEditor Support on Performance Degradation

Image maps and HTML5

This question is more philosophical than technical.
I've trained myself as a web developer back when web developers were called webmasters and my tool of choice was FrontPage, moving onto Evrsoft 1st Page 2000.
That was the last time I used an HTML image map.
Now it's HTML5, AJAX, vector canvasses, CSS 3D, jQuery, local storage, touchscreen Safari, you name it. The image map has faded into an obscurity where not even Google comes up with too many relevant results; a mandatory W3C Schools entry and some forum posts from 2004.
Obviously creating a website navigation or similar triviality using an image map was a bad idea back then and it certainly is inexcusable today.
But right now I have a task to create a polygon clickable area on top of a div with a background image.
I'd have no issue doing this in image map since it seems like it was designed for a use case exactly like this, and while I've done no tests, I couldn't imagine any browser dropping support for an element that worked beautifully for years. But I can't help but think that there must be a better way to do this today.
My web creation philosophy is to develop for IE5.5, and then design for Chrome edge. This means that the site first needs to work on a basic level on even the most antiquated browser, and then start adding JS & CSS to make it more beautiful, more usable, faster, simpler, friendlier and better.
As such, while I know I could do a canvas in Raphaƫl and add all kinds of snazzy hover effects and things, I think making functionality as simple as this shouldn't require a 89 kb (or X kb) JS library. Or even JS at all.
I don't know if CSS3 has capabilities to define polygonal areas, but while recognizing the great possibilities introduced by CSS3, I prefer keeping anything defined there as non-essential flair that would degrade gracefully.
So in today's webdev world, what would be the most cross-browser way to define a polygonal click area (preferably in a way that's grabbable by a jQuery .hover(), or at least a CSS :hover), that isn't dependent on JavaScript or CSS attributes available in a minority of browsers? Is image map really the only way to do it? What of mobile devices?
Why is using image maps for navigation inexcusable? It's a tool like any other; it has a time and place. Using imagemaps with javascript enhancements is backward compatible, degrades gracefully, and has 100% browser support. They don't need a plugin like flash.They've been supported practically since the dawn of the web browser. Just because something's old doesn't mean it isn't useful; quite the opposite, it means it's well supported.
I wrote a jquery plugin called ImageMapster to add effects to imagemaps so you could create interactive images without using flash. It would be easy to implement a tool that had the same functonality without Javascript support by replacing with a list in those cases. Personally, I think trying to write for the web without javascript is like trying to drive a car without tires. 99% of the web doesn't work without it any more. This isn't 1995. But if you really are concerned, the nice thing about imagemaps is the basic navigation functionality still works. There's no way to accomplish that just with CSS -- not even CSS3 if you have irregular shaped areas.

Custom UI design in Sencha and othere touch frameworks

Can someone please guide me regarding which touch framework (javascript) I should use to make a tablet app? I am new to this area and I am looking for something which allows me to play with my own UI design comfortably.
I went through sencha as I heard its apt for a tablet app environment but I am (sorry, it might sound odd) not able to make out whether I can use my own UI design to make app in sencha. Or any other framework (stable) allows to use custom UI design?
There aren't any major differences between handsets and tablets, except for the screen size. For example, what you would show in a handset in one long scrolling screen, would be shown in a split-screen on a tablet (I am concentrating on the user-experience here).
Split-screen support in still rare in the jscript frameworks, since webkit browsers didn't fully support scrolling only parts of a page (i.e. an iframe or overflow:scroll divs), this support is only now starting to get materialized with iOS5 (Android already had this since 2.2, but it never worked right).
There have been other jscript solutions (like iScroll), but being client code they are not always bringing the full "experience" to the client.
The JQuery-Mobile docs have a version under testing, you can try that in a tablet/handset to see the differences.
Regarding your "own UI design", if you mean colors/icons/buttons that's possible on any framework. Where the problems start is when you want to create custom layouts, and each framework provides partial support depending on what exactly you want to achieve.
In general, I'd say Sencha totally separates you from HTML design - you build everything using JSON controls and it has an extensive events/rendering code (of course you can write your own controls), whereas frameworks like JQuery mobile work directly on the HTML (you specify data-* attributes for the details) and renders it almost the same (ok, it does adds wrapping layers, but in general it's still pure HTML).
As always, "it depends" on what you want to achieve and what you are ready to give up... ;-)
Sencha Touch (our framework) is particularly well suited to tablet apps because it has an implementation of multiple scrollable areas that works on older iOS and RIM devices, not just iOS5. But, the intention with Sencha Touch is that you create your app using the built-in UI components (carousels, momentum lists, tabs, etc.) or, if you have unique UI elements, then you will need to extend an existing component or build a custom component. If you're expecting to be able to slap some of your own HTML into innerHTML or even a Touch xTemplate, then you will be setting yourself up for failure. But the good news is that there are tutorials on doing your own components, and there are plenty of apps that you can look at the source of, in order to guide your development. Lots of people have built apps with custom UI's
You need some level of JavaScript experience to use Sencha Touch, so if you're coming from a non-JavaScript web design background, you'll have to get down the JavaScript learning curve first.

RadMenu Performance Issues

I have a page that has a RadMenu and a RadGrid used together. The RadGrid is used in client-side mode. This means that the loading, saving, editing and creation of new records is done via ajax. The grid seems to work fine but after sometime it appears that The menu dropdowns tend to be slower and after more use the entire page freezes. I am not sure whether it is this combo that causes this effect or either of the controls since a lot of js is being used to automate the menu dropdown and the ajax calls to the. This is the order in which the error is reproduced.
The menu control is located up above in a separate iframe and the grid is below in a separate iframe. This makes the scenario more peculiar since different js files are loaded in two iframes and there is no interaction between the two.
What could be the cause of the sudden freezing, a memory leak perhaps? Better still could it be a general problem when a lot of ajax interactions occur and other events are fired before the callbacks return?
On the video once can see that when the grid page loads everything seems fine, but after firing some events and performing some actions, the menu starts taking a lot of time to load. It reaches a point that it takes such a long time for the drop downs to display and eventually the entire browser tab freezes.
I have uploaded a video of the effects and here is the link:
http://megaswf.com/simple_serve/87153/
"Better still could it be a general problem when a lot of ajax interactions occur and other events are fired before the callbacks return?"
- that's most of your problem. Telerik's JavaScript is thrown together, just view source and check out how many scripts are on the page, as well as the inlineJS. Contacting Telerik couldn't hurt, but I doubt it'll help. If you have a float based layout, when you go into edit Telerik, the tools don't work because they're relying on absolute positioning. I had to find my own solution. Good luck.

Resources