Skip to content

CLOUDSTACK-9068: Listing Port Forwarding Rules take too much time to load - #1081

Merged
asfgit merged 1 commit into
apache:4.6from
nitin-maharana:CloudStack-Nitin15
Nov 28, 2015
Merged

asfgit merged 1 commit into
apache:4.6from
nitin-maharana:CloudStack-Nitin15

Conversation

@nitin-maharana

Copy link
Copy Markdown
Contributor

For setting the width of each data item for each row of Port Forwarding rules, it was processing all rules.

Basically for each data item, it was searching in all rules, which is un-necessary.
If there are N-Rules, It was processing N-times.

Now, it only processes one time by taking all N-rules at a time.
The previous solution was of O(NxN). Now its changed to O(N).

…load

For setting the width of each data item for each row of Port Forwarding rules, it was processing all rules.

Basically for each data item, it was searching in all rules, which is un-necessary.
If there are N-Rules, It was processing N-times.

Now, it only processes one time by taking all N-rules at a time.
The previous solution was of O(NxN). Now its changed to O(N).
@remibergsma

Copy link
Copy Markdown
Contributor

Thanks for the fix @nitin-maharana. Tried it and it works great! LGTM

screen shot 2015-11-21 at 21 10 24

Pinging @DaanHoogland @bhaisaab to review.

@DaanHoogland

Copy link
Copy Markdown
Contributor

less is more, if it works it's fine. How does it behave on resizing?

@remibergsma

Copy link
Copy Markdown
Contributor

@DaanHoogland resizing the screen? I didn't test that.

@yadvr

yadvr commented Nov 23, 2015

Copy link
Copy Markdown
Member

LGTM, haven't tested with resized UI though

@remibergsma

Copy link
Copy Markdown
Contributor

@DaanHoogland Is that what you mean.. testing it with the wider UI or..?

@DaanHoogland

Copy link
Copy Markdown
Contributor

I was wondering; as it seems obvious from your screenshot that initial rendering works, after an item (i.e. row) has been added, whether it also re-renders ok after adjusting tables columns or resizing the window/frame. The patch is a simple removal of a render helper. I didn't take time to test yet. BTW this does not mean -1!

@remibergsma

Copy link
Copy Markdown
Contributor

@DaanHoogland This is already much better, when you have 30 port forwarding rules the UI is unusable without this fix. When we want to make more improvements, let's make a new PR. I'd rather test another PR instead of this one again and try resizing ;-) Agree?

@DaanHoogland

Copy link
Copy Markdown
Contributor

sure, it was not meant as a -1

@asfgit
asfgit merged commit 48df255 into apache:4.6 Nov 28, 2015
asfgit pushed a commit that referenced this pull request Nov 28, 2015
CLOUDSTACK-9068: Listing Port Forwarding Rules take too much time to loadFor setting the width of each data item for each row of Port Forwarding rules, it was processing all rules.

Basically for each data item, it was searching in all rules, which is un-necessary.
If there are N-Rules, It was processing N-times.

Now, it only processes one time by taking all N-rules at a time.
The previous solution was of O(NxN). Now its changed to O(N).

* pr/1081:
  CLOUDSTACK-9068: Listing Port Forwarding Rules take too much time to load

Signed-off-by: Remi Bergsma <github@remi.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants