Using Count versus Counter Variable to Optimize Performance

Say you were building a facebook bubble clone. Application has datatypes Posts and Comments. In the home content screen, the number of comments is listed for each post.

Would it be more efficient to count the number of Comments on a Post to calculate the number displayed on-screen or create a field on the Posts datatype called Comment Number to track the count?

Are there any tools in bubble to make performance determinations like this to determine generally what is the more efficient approach when comparing options other then trial and error?

I could be wrong, but I think the data field for comment number would perform better - as this is just a data field to retrieve, instead of having to search for and count the number of comments.

But yes, I agree with you, there should be outlines that let you know one way or the other as to which way is more beneficial for performance.

Tal
nocodify.com

1 Like

Thanks for your input @Nocodify