Skip to content

[8.19] [Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)#226186

Merged
lgestc merged 1 commit intoelastic:8.19from
lgestc:backport/8.19/pr-224831
Jul 2, 2025
Merged

[8.19] [Security Solution][Sourcerer] Replace unnecessary useDataViewSpec calls (#224831)#226186
lgestc merged 1 commit intoelastic:8.19from
lgestc:backport/8.19/pr-224831

Conversation

@lgestc
Copy link
Contributor

@lgestc lgestc commented Jul 2, 2025

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…lls (elastic#224831)

## Summary

As useDataViewSpec uses are expensive (due to toSpec method in the data
view implementation), this PR
adds in an optional switch to the hook and actually replaces it where we
only need the data view id and not the full spec.

### Testing

Set the FF,

```
xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']
```

verify that the app still works correctly (timelines)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 711ab70)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution/public/data_view_manager/hooks/use_data_view_spec.ts
@lgestc lgestc requested a review from kibanamachine as a code owner July 2, 2025 12:38
@lgestc lgestc added the backport This PR is a backport of another PR label Jul 2, 2025
@lgestc lgestc enabled auto-merge (squash) July 2, 2025 12:38
@lgestc lgestc merged commit 82471c5 into elastic:8.19 Jul 2, 2025
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.4MB 9.4MB +80.0B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants