Code Monkey home page Code Monkey logo

Comments (12)

VWoeltjen avatar VWoeltjen commented on July 23, 2024

Note that by "reasonably large set of objects", I mean roughly 100,000

from openmct.

larkin avatar larkin commented on July 23, 2024

I've seen this as well.

Is there any chance of lots of DOM nodes being instantiated and tossed?

Or potential portions of the algorithm that are slow-- not linear time?

For comparison, the table view can filter and sort 50k rows with unnoticable latency and there is no throttling occurring. V8 should have no problem working with datasets in the 250,000-1,000,000 record range, but needless DOM operations will quickly trash performance.

Pete

On Aug 28, 2015, at 9:13 AM, Victor Woeltjen <[email protected]mailto:[email protected]> wrote:

For a reasonably large set of objects, typing in search bar can be unresponsive after the first one or two characters, particularly if there are a lot of hits for those characters. Unresponsiveness lasts for roughly 1-2s. Subsequent typing gives results more quickly.

Could try throttling the search functionhttps://github.com/nasa/openmctweb/blob/509badb225ee7f619c29bd886fa56ca462748e03/platform/search/src/controllers/SearchController.js#L132 using the throttlehttps://github.com/nasa/openmctweb/blob/6aaa887e658a91166270de0ab066168d2575f6ed/platform/core/src/services/Throttle.js service.

May also want to do something to wait until previous search results have been returned before initiating a new search.

This was observed using a non-ES data store (so issue may also be specific to GenericSearch)

โ€”
Reply to this email directly or view it on GitHubhttps://github.com//issues/91.

from openmct.

slhale avatar slhale commented on July 23, 2024

I tried adding throttle to the search controller, but I don't have a data set as large as 100 000 items to check it out with.

from openmct.

VWoeltjen avatar VWoeltjen commented on July 23, 2024

You could try using Example Taxonomy and increasing the number of "telemetry points" that get instantiated per "subsystem" - see https://github.com/nasa/openmctweb/blob/master/example/taxonomy/src/ExampleTaxonomyModelProvider.js#L47

That said, I am a little suspicious that this may be due to the number of search results that get returned from the worker. The worker is checking for a maxResults property to determine if it should truncate, whereas the provider is passing in a maxNumber property. I think this means that a larger number of results are coming back from the worker.

@larkin has a good point, though, and in general this number shouldn't be daunting. Did a little debugging, and around 7000 domain objects match the first letter of the query. It looks like the observed latency is split just about evenly between garbage collector (40%) and something Angular (40%); the Angular traces aren't particularly informative, but if there's somewhere where a large number of timeouts or promises are occurring that is suspicious.

That said, if we get a working maResults of around 1000 I think this problem won't be observable. Also don't imagine anyone paging through 1000 domain objects any time soon. Looking at the generic search implementation, it looks like results don't get sorted by score until after truncating to maxResults - that would need to change as well so that the 1000 most relevant results are the ones that actually come back from the worker.

from openmct.

larkin avatar larkin commented on July 23, 2024

@VWoeltjen @slhale Looks like fixes for this have been pushed in open91 but not opened for review & integrate. Is there further development work here necessary or is this ready to be reviewed-- i.e. should we open a pull request? (https://github.com/nasa/openmctweb/compare/open91)

from openmct.

VWoeltjen avatar VWoeltjen commented on July 23, 2024

@larkin Looking over the changes there, I don't think that's ready to merge. The usage of throttle would need to be moved out of the search method, at the very least, but generally speaking I think the issue needs more investigation to understand root causes.

from openmct.

larkin avatar larkin commented on July 23, 2024

@VWoeltjen I'll put this on my list for follow-up (probably next week).

from openmct.

larkin avatar larkin commented on July 23, 2024

Resolved with #193.

from openmct.

RCarvalhoNASA avatar RCarvalhoNASA commented on July 23, 2024

Testathon 20151123: typing in the search field still becomes very laggy after the first couple of characters. It's only a couple of seconds, but while I would expect that delay in showing the search results, I wouldn't really expect it for the letters I'm typing. Sample strings include 'bmsio', 'epsio', 'antpt' (which are all used as the start of the name of multiple packets within the RP15 packet structure used in the testathon)

from openmct.

VWoeltjen avatar VWoeltjen commented on July 23, 2024

Reopening based on previous comment.

from openmct.

larkin avatar larkin commented on July 23, 2024

Will inspect to find causes of slow object instantiation, and if that does not quickly yield an answer, will implement a short term fix such as debounce or only searching on submit.

from openmct.

charlesh88 avatar charlesh88 commented on July 23, 2024

Notes from tagup 10/26/16:

  • @larkin: need to be able to cancel requests to the Search service.

from openmct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.