Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove compressed ids #2482

Merged
merged 10 commits into from
Jan 22, 2018
Merged

Conversation

imtayadeway
Copy link
Contributor

@imtayadeway imtayadeway commented Oct 20, 2017

Removes:

  • the miqUncompressedId js function
  • the CompressedIds mixin and any references to it
  • any references to ApplicationRecord-level compressed id methods

I can identify a few more cleanup tasks, but I think they would be best suited to a follow up PR, given the size and scope of this one.

/cc @chrisarcand @Fryguy
@miq-bot rm-label wip
@miq-bot add-label technical debt
@miq-bot assign @martinpovolny

@miq-bot miq-bot added the wip label Oct 20, 2017
@miq-bot
Copy link
Member

miq-bot commented Oct 23, 2017

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Oct 24, 2017

This pull request is not mergeable. Please rebase and repush.

@chrisarcand
Copy link
Member

@miq-bot assign @martinpovolny

@imtayadeway
Copy link
Contributor Author

@miq-bot rm-label wip
@miq-bot add-label technical debt

@miq-bot miq-bot changed the title [WIP] Remove compressed ids Remove compressed ids Oct 24, 2017
@martinpovolny
Copy link
Member

martinpovolny commented Oct 25, 2017

This is really cool 🍻 !

I am however lacking the courage to merge this so close before the release. What do you think, guys and lads?

ping @AparnaKarve, @h-kataria, @mzazrivec, @himdel, @skateman, @dclarizio ?

@imtayadeway
Copy link
Contributor Author

I am however lacking the courage to merge this so close before the release.

Totally understand this. Something to bear in mind, though, is that it will make backporting a lot easier if done before

@AparnaKarve
Copy link
Contributor

This is really cool 🍻 !

Totally second that!

Totally understand this. Something to bear in mind, though, is that it will make backporting a lot easier if done before

And totally second that too! :-)

==> GTG from me

@martinpovolny
Copy link
Member

==> GTG from me

@AparnaKarve : "GTG" -- does that mean reviewed and tested? Or do you volunteer to do that? I don't have the capacity right now.

@AparnaKarve
Copy link
Contributor

@martinpovolny I can't test this at the moment.
Let us revisit this on Monday.
Thanks.

@dclarizio
Copy link

@imtayadeway while I'm not against this, is there some reason this is being done? The original reason we compressed the IDs is because they were taking up a lot of memory on the browser side for trees and lists that had thousands (or tens of thousands) of elements that were identified using the really long IDs. There may even be tree nodes that contain chains of IDs, so that would multiple how much memory is required.

I'm thinking we may want to wait to do this upstream and not in the G release, in case it might affect performance on the browser side.

Thoughts?

@skateman
Copy link
Member

@dclarizio actually I was thinking about redesigning the trees to have complex keys. Instead of xy-1z4 we could do something like: {klass: 'Xy', id: 1000000...004} where the klass can remain the same 2 char string (but not necessarily) and the id would be an integer that requires significantly less memory than a string. So this PR is a good step in the direction I'm planning, but I'm also afraid of Gaprindashvili-ing this.

@dclarizio
Copy link

So if there's no objections and no real issue to "fix", I suggest we keep this upstream after the gaprindashvili release is cut so we can let it burn in and be tested for performance.

@miq-bot
Copy link
Member

miq-bot commented Oct 26, 2017

This pull request is not mergeable. Please rebase and repush.

@martinpovolny
Copy link
Member

martinpovolny commented Oct 27, 2017

@dclarizio : we had a discussion on this in Mahwah with a couple of guys. This will simplify things -- having just one form of the ID.
I can imagine there where performance issues with the long IDs on browser side in the past. But I can not imagine that if could be a problem for today's browsers.

I also think that a detailed testing is needed because there might be pieces of code that assume the compressed IDs that are hard to spot and problems can surface after some time.

@imtayadeway imtayadeway force-pushed the remove-compressed-ids branch from cd83493 to 2d17eef Compare November 1, 2017 19:00
@himdel
Copy link
Contributor

himdel commented Dec 4, 2017

Note:

after this gets merged, there will be no need for long_id in report_data and we may want to revert parts of #2791, to use id again

@martinpovolny
Copy link
Member

@imtayadeway : Tim, the time has come for this to be merged. Will you, please, rebase (hopefully the last time)?

Thank you very much!

@miq-bot
Copy link
Member

miq-bot commented Jan 19, 2018

Some comments on commits imtayadeway/manageiq-ui-classic@1e16218~...93981cd

app/controllers/miq_policy_controller/conditions.rb

  • ⚠️ - 78 - Detected pp. Remove all debugging statements.

app/controllers/miq_policy_controller/policy_profiles.rb

  • ⚠️ - 60 - Detected pp. Remove all debugging statements.

app/views/miq_policy/_policy_details.html.haml

  • ⚠️ - 266 - Detected pp. Remove all debugging statements.

app/views/miq_policy/_profile_list.html.haml

  • ⚠️ - 15 - Detected pp. Remove all debugging statements.

app/views/report/_role_list.html.haml

  • ⚠️ - 20 - Detected pp. Remove all debugging statements.

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Jan 19, 2018

Some comments on commits imtayadeway/manageiq-ui-classic@1e16218~...93981cd

app/controllers/miq_policy_controller/conditions.rb

  • ⚠️ - 78 - Detected pp. Remove all debugging statements.

app/controllers/miq_policy_controller/policy_profiles.rb

  • ⚠️ - 60 - Detected pp. Remove all debugging statements.

app/views/miq_policy/_policy_details.html.haml

  • ⚠️ - 266 - Detected pp. Remove all debugging statements.

app/views/miq_policy/_profile_list.html.haml

  • ⚠️ - 15 - Detected pp. Remove all debugging statements.

app/views/report/_role_list.html.haml

  • ⚠️ - 20 - Detected pp. Remove all debugging statements.

@miq-bot
Copy link
Member

miq-bot commented Jan 19, 2018

Checked commits imtayadeway/manageiq-ui-classic@1e16218~...93981cd with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
192 files checked, 77 offenses detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.5-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

app/controllers/ansible_credential_controller.rb

app/controllers/application_controller/buttons.rb

app/controllers/application_controller/miq_request_methods.rb

app/controllers/catalog_controller.rb

app/controllers/chargeback_controller.rb

app/controllers/miq_ae_customization_controller/dialogs.rb

app/controllers/miq_ae_customization_controller/old_dialogs.rb

app/controllers/miq_policy_controller/events.rb

app/controllers/mixins/vm_show_mixin.rb

app/controllers/ops_controller/db.rb

app/controllers/ops_controller/diagnostics.rb

app/controllers/ops_controller/ops_rbac.rb

app/controllers/ops_controller/settings/common.rb

app/controllers/ops_controller/settings/ldap.rb

app/controllers/picture_controller.rb

app/controllers/pxe_controller/iso_datastores.rb

app/controllers/pxe_controller/pxe_customization_templates.rb

app/controllers/pxe_controller/pxe_servers.rb

app/controllers/report_controller/menus.rb

  • ❗ - Line 6, Col 94 - Rails/Present - Use if x_node(:roles_tree).split('-').last.present? instead of unless x_node(:roles_tree).split('-').last.blank?.

app/controllers/report_controller/saved_reports.rb

app/controllers/report_controller/widgets.rb

app/controllers/service_controller.rb

app/controllers/storage_controller/storage_d.rb

app/controllers/storage_controller/storage_pod.rb

app/presenters/tree_builder_chargeback_reports.rb

app/presenters/tree_builder_iso_datastores.rb

app/presenters/tree_builder_pxe_servers.rb

app/presenters/tree_builder_utilization.rb

spec/services/cloud_topology_service_spec.rb

spec/services/infra_topology_service_spec.rb

spec/services/network_topology_service_spec.rb

@imtayadeway imtayadeway reopened this Jan 19, 2018
@imtayadeway
Copy link
Contributor Author

@martinpovolny this should be GTG now!

@martinpovolny
Copy link
Member

Thanks, @imtayadeway. I was testing this in the UI and found no issues.

I know that @h-kataria and @AparnaKarve and @bmclaughlin also will test this a bit today. After that I believe I can merge this.

@imtayadeway
Copy link
Contributor Author

@martinpovolny thanks for your additional testing! LMK if I can do anything else! ❤️

@h-kataria
Copy link
Contributor

h-kataria commented Jan 22, 2018

@martinpovolny i have tested in UI for a while, so far all good. I say let's merge this.

@martinpovolny martinpovolny merged commit 312f604 into ManageIQ:master Jan 22, 2018
@martinpovolny martinpovolny added this to the Sprint 78 Ending Jan 29, 2018 milestone Jan 22, 2018
h-kataria added a commit to h-kataria/manageiq-ui-classic that referenced this pull request Oct 29, 2018
h-kataria added a commit to h-kataria/manageiq-ui-classic that referenced this pull request Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants